Simple i think.... breaking SQL
Made it simpler to read below:
'This works
Set rs = db.OpenRecordset("SELECT description FROM" & selectTable)
'Trying to get it so that i can put the column name from a variable
Dim i As String
i= "description"
'none of these work
'Set rs = db.OpenRecordset("SELECT" i " FROM" & selectTable)
'Set rs = db.OpenRecordset("SELECT' i ' FROM" & selectTable)
'Set rs = db.OpenRecordset("SELECT" & i " FROM" & selectTable)
im sure the fix is very simple, thanks in advance
|