View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
parkin_m parkin_m is offline
external usenet poster
 
Posts: 8
Default Simple i think.... breaking SQL

My syntax is slightly wrong and having a look on the help file hasnt helped.

This works--------------------------------------------------------------------
Set rs = db.OpenRecordset("SELECT description FROM" & selectTable)

How do i get this to work?---------------------------------------------------
Dim i As String
i= "description"
I have tried this - Set rs = db.OpenRecordset("SELECT" i " FROM" &
selectTable)
+ this - Set rs = db.OpenRecordset("SELECT' i ' FROM" &
selectTable)
+ this - Set rs = db.OpenRecordset("SELECT" & i " FROM" &
selectTable)

im sure the fix is very simple, thanks in advance
--
--
Thanks

Parkin_m