I am wanting to use a variable in my via query syntax. I just can't get the syntax right. I have this, but it puts literally ' + name + ' in the query
How should I write this so the actual value is added to the query?
Code:Dim info As String Dim pdf As QueryDef info = "Select itemSold From Info " & _ "Where salesperson = ' + sp + ';" Set qdf = .... DoCmd.OpenQuery qdf.Name qdf.Close Set pdf = Nothing