-
Hello everyone
I have tried to use a sql statement in access, where the field is a combo box. I load the query and write
SELECT * FROM TblOne WHERE field1 = 'choice'
field1 is a combo box.
The query does not work. what you think I might be doing wrong?
-
Not clear on when you want to excecute this query but I think the following syntax will work. (Note you do not need the single quotes if your field data type is numeric - text only)
"SELECT * FROM TblOne WHERE field1 = '" & me.combo & "'"
If you want to refresh the recordsource of a form for example this could go in the afteupdate event of the combo box as so:
me.recordsource = "SELECT * FROM TblOne WHERE field1 = '" & me.combo & "'"
Hope this helps?