sql - select [combobox value] & "text" -


i trying build select statement in access vba, based on value chosen user in combobox.

example :

"select [8_sv_rt] data condition = value

i need 8 dependent on combobox value form. (8,10,12 ....)

the name of combobox dn, , created string col = "_sv_rt"

so far have :

"select [dn] & '" & col & "' data condition = value

it returns value 8_sv_rt combobox, want use after select statement, not result. must missing syntax or something? can please advise?

if understand question right:

dim sql string  sql = "select [" & me.mycombobox & "_sv_rt] data condition = value" 

edit:
use exact object names question (before siddharth edited it, over-read combobox named dn) , take siddharth's (now deleted) comment consideration:

dim sql string dim col string  col = "_sv_rt" sql = "select [" & dn & col & "] data condition = value" 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -