movie database filter multiple check box data??

dcfi6052

Registered User.
Local time
Today, 04:44
Joined
Jan 25, 2012
Messages
34
Hello again guys and gals,

I have another puzzler from my movie database that baffles me :confused:

I am copying and pasting some explanation of my database from a post I did about 10 minutes ago. Just in case you think it's a double post since the titles are similar.

I have my main data table with each record being a movie. The fields consist of movie name, genre, rating, runtime, etc. My question is on my genre field which is a drop list/checkbox format allowing multiple criteria to be selected.

So with that explanation out of the way....I have a search form with multiple buttons (ie. Search movie name,genre, rating, runtime, etc.) Again, I'm looking at the search genre button here. After clicking on the search movie genre button a small pop up window comes on screen with a single drop down combo box containing a total of around 20 genres. When the user selects a genre and clicks the corresponding run search button the pop up window should close and a new form shall open displaying the results.

This one is tricky because Access doesn't seem to like filtering fields with multiple data. Is their a way to set it up to get around it? Without having to change my current data that is?

The only solution I could think of (don't even know if it's possible) is to somehow temporarily convert all the genres from a combo drop down box to a text box. That way Access could recognize the data to filter and display it in a form?? :confused:

Any thoughts?....Oh, I have Access 2010.

Thanks!
 
You will need to:

1. Loop through the selected items of the listbox using ItemsSelected property
2. For each item concatenate the bound column to form the input of the IN keyword in SQL, e.g. IN ('Horror', 'Action', 'Adventure').
3. Apply the IN () part to your SQL statement or form in order to filter it.
 

Users who are viewing this thread

Back
Top Bottom