search form with optional dropdown choices

kato68

Registered User.
Local time
Today, 08:14
Joined
May 12, 2003
Messages
45
I have a form that has three dropdown choices. All the choices are fields from the same table. My search works if all three boxes are used, how do I make the fields optional so if a person only wants to search on one or two of the choices it will run the search???

I tried to do this is vba, using querydef but I couldnt figure out the exact syntax to use to create a querydef. I am pretty sure I can create a SQL statement to collect what I need, but I can't figure out how to run it.

Please help, it seems like something so easy and its becoming a pain in my butt.
 
Multiple Combo Boxes to Select records

Hi Uncle Gizmo,

I am an absolute begginer at Access and I am trying to build a database which will hold data about participants doing lessons in Skateboarding and BMX. I have downloaded your file "Multiple Combo Boxes to Select records" which looks like it would be perfect for creating lists of names for different lessons.

I.e I need to print a list of kids who have registered for a particular session on a particular day.

Problem is I have absolutely no idea how to modify your file to do this.

I can understand that this is a huge ask, but any guidance would be greatly appreciated.

:confused: :confused: :confused:
 
Are you able to list the results you require in a Query?
 
Have you built your tables with separate fields for each type of lesson?
 
can i be of any help...

this is hw i have created my Search Form.


i have a continuous form with a textbox name "Search" in the Form Header. I have based my form on a Query and in the criteria i have placed the following

Like "*" & [Forms]![FormName]![Search] & "*"

you cand use this in as many field as possible.
now place the followng in your declaration section of the form

Public Function Reset_Fields()
Me.Search.SetFocus
Me.Search = "*"
End Function

in the onload event you place the following
call Reset_Fields()

and now runthe form and try searching for the specified field....

hope this would work.. if it doesnt then let me knwo i will send a demo
 

Users who are viewing this thread

Back
Top Bottom