Hi All
Hopefully this is not too difficult.
I have a declared string
I am trying to run a simple SELECT statement
"SELECT column_name FROM table
WHERE combobox = column_name"
I am trying to store the results of that query in my string but, get this, when i run the code, Access VBA is store the exact string in strModel
ie as supposed to running the SQL query and store the result in strModel, its making
strModel = "SELECT column_name FROM table WHERE combobox = column_name"
i debugged this and tested the output in a textbox and this is how it is displayed.
I saw some notes online about setting a dao recordset and using that to run the code
etc
I have tried this but to no avail (actually I'm not sure i know how to use this in my scenario)
Can someone please help with this.
Thanks
Hopefully this is not too difficult.
I have a declared string
Code:
dim strModel as string
I am trying to run a simple SELECT statement
"SELECT column_name FROM table
WHERE combobox = column_name"
I am trying to store the results of that query in my string but, get this, when i run the code, Access VBA is store the exact string in strModel
ie as supposed to running the SQL query and store the result in strModel, its making
strModel = "SELECT column_name FROM table WHERE combobox = column_name"
i debugged this and tested the output in a textbox and this is how it is displayed.
I saw some notes online about setting a dao recordset and using that to run the code
Code:
dim dbs as DAO. Recordset
dim strqry as querydef
I have tried this but to no avail (actually I'm not sure i know how to use this in my scenario)
Can someone please help with this.
Thanks