Hi All,

I am trying to pass a variable into a SQL Query, so that query is updated as per user input. But i am unable to execute it.
below is the code:

VBA:
Dim a As String 
Dim query As String 
 
a= Name 
query = " Select & a & as UserName from Details"
I also tried using CHR(32) to insert a space but no success. Please help.