Select Query referencing multi select list box (1 Viewer)

krautMc

New member
Local time
Today, 04:24
Joined
Nov 12, 2008
Messages
3
I'm trying to run a query that will return records based on multiple values from a multi select list box on a form. I've read other threads and I'm still not able to solve the problem. I have no experience writing queries using SQL, I've only used design view and most of the other threads lead to writing the query in SQL.

I began by trying to take the values from the multi select list box and put them to a text box, then run the query off of that, but the query doesn't recognize it. I tried putting the data in the text box in multiple formats and it still did not work.

If anyone has a solution I would be very greatful. Thank you.
 

Attachments

  • new.mdb
    292 KB · Views: 169

WayPay

Registered User.
Local time
Today, 11:24
Joined
Nov 3, 2008
Messages
118
Made a few small changes: Row Source Type, Row Source and Bound Column properties for the list box.
 

Attachments

  • new_2.zip
    29.7 KB · Views: 238

krautMc

New member
Local time
Today, 04:24
Joined
Nov 12, 2008
Messages
3
Sorry I was just trying to make a simple example. The numbers are just an example of another field. If the other field was not numbers how would I go about doing this?
 

WayPay

Registered User.
Local time
Today, 11:24
Joined
Nov 3, 2008
Messages
118
Ah, I thought you were having trouble getting the list box populated. I didn't see the VBA :eek:. Have a look at the updated example.

I don't know where and how far you want to take this. The Query Designer generates SQL for you; you can see its result in SQL View. You can also paste SQL in SQL view; you can then look at it in Design View (if the SQL is valid, that is :D).

Yell if you need to know more.
 

Attachments

  • new_3.zip
    14.4 KB · Views: 366

krautMc

New member
Local time
Today, 04:24
Joined
Nov 12, 2008
Messages
3
I figured a way to do it with your help. Thanks a lot!
 

Users who are viewing this thread

Top Bottom