Newbie Question about Run Query Buttons in Forms

HappyBunny

Registered User.
Local time
Today, 13:00
Joined
Jun 6, 2008
Messages
22
I have 8 unbound combo box controls in a form and a "Run Query" Button below.

What should I put in my query criteria fields?? How do I accomodate for the OR logic necessary here?

I want to be able to select as many and as few of the given 8 optional search criteria selectors, but I always end up with zero records after running the query.
Right now I have [Forms]![NewForm]![Combo0] in my query criteria fields
where NewForm is the form with the Button on it and Combo0 or Combo12.. Combo3l.. Combo# is the name of my combo box field.

What am I doing wrong. Please Help. Thanks :D
 
As regards the Or logic in a query you should put your criteria on separate rows in your query design.

However, i think you should explain a little more what's your data all about and what you're trying to achieve with the eight unbound control boxes, as there might be a better approach to your problem.
 
I have 8 drop-down list selectors ( Relay ID, Substation, Manufacturer, Type, Model number... and so on). There is a "Run Query" button linked to a
Query that has a separate criteria statement for each of the 8 fields.
For example, I want to be able to select a Substation and a Type, but leave all other choices blank. Or I want to be able to select only a Model number and not touch the rest of them. Or maybe I could pick an option from all 8 lists and see what comes out ofter the query is run..
Maybe if I put down default values ("..." for example) and then incorporate a
Like "..." Or statement into the search criteria???
 

Users who are viewing this thread

Back
Top Bottom