VBA code to filter form with multiple check boxes

leontyukv

New member
Local time
Today, 07:42
Joined
Oct 13, 2011
Messages
5
I created a simple, one table, database to store and search for worship songs for my church. However, to create the search form that I want, I need to do some VBA coding, which I am new to. Can someone please give me some code syntax to work with for the following requirements:

I have a split search form (form for filter/search options and datasheet for filter results) already set up to filter the songs by each letter of the alphabet. Now I want to have check boxes to filter the songs by song categories, since each song is assigned to a subject/category. I want to be able to pick more than one category to include in my filter. So checking the box would apply the filter and unchecking the box would remove that filter. I have like 50 different categories and the songs are not in English, but lets just work with these 3 sample categories, I can follow the example: Category1, Category2, and Category3.

My table fields are: SongTitle, Category, Tone, Language, LastSung, and Open (which is the hyperlink field to open the song ppt).
I also already have all my queries for pulling songs by categories made, if that makes it any easier.

Thanks ahead for the help...
 
Last edited:
Welcome to the forum! :)

This topic has been discussed many times on here. Just a quick search should yield some useful results.

By the way, how are the categories stored? As individual records or as fields with checkboxes?
 
Thanks... If I understood your question right, the categories are all stored in a separate table. Then in my main SONGS table, the category field has a drop down menu, which pulls from the stored categories and allows to choose from the available categories.
 
So they are saved as individual records then. I was checking if it was properly normalized or else the solutions you will find on here won't work.

What have you found so far? The Advanced Search feature is quite powerful.
 
Yeah it is a fairly simple database, so I made sure it is normalized from the beginning.

I was in class today and haven't had the time to search yet. I will tonight.... but if you can point me to some familiar threads, it would be much appreciated.
 

Users who are viewing this thread

Back
Top Bottom