|
-
May 5th, 2000, 02:15 AM
#1
Thread Starter
New Member
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?
-
May 5th, 2000, 02:43 AM
#2
Addicted Member
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|