!!! How to create this Query?

prometro

Registered User.
Local time
Today, 14:05
Joined
Aug 29, 2006
Messages
55
In database is one Table, where are only two fields (ID and Text):
ID Text
1 AA
2 BB
3 AA
4 CC
5 EE

And in a form I have TexBox where is a text string, for ex. : aa; cc; ee
Im trying to create Query which find all records from Table which contains
"aa" or "cc" or "ee".

If I use concrete values in Query, it works :
SELECT * FROM Table WHERE (((Table.text) In ("aa","cc,ee")));
but when I use refer to a TextBox it doesn't works :(:
SELECT * FROM Table WHERE (((Table.text) In ([TexBox])));
Because it will do [TextBox]="aa;cc;ee" and not "aa";"cc";"ee"
Can anyone help me with it?
Thank you and have nice day.
Jira
 
Or you could use a listbox and then create your SQl dynamcal with the values choosen in the listbox.
 
Thank you

Thank you for reply very much - yes maybe I didnt explain my question well - but my english is not the best you know:)
So to explain my problem I drew small picture.
Please look at it and if you will know how to do it please reply.
Thank you Jira
 

Attachments

Another way is to populate a temporary table from the listbox and join this to the original table in a query.
 

Users who are viewing this thread

Back
Top Bottom