Drop down lists or list box

me3

Registered User.
Local time
Today, 21:35
Joined
Nov 23, 2014
Messages
13
Hi,
In my table I have the following fields that are tick boxes
Vee
Cathedral
Round Bilge
Bilge Keel
RIB
Semi-Displacement
Keel
Lifting Keel

Each record can take a couple of these options. For example record 1 could be ticked for a 'vee' and a 'cathedral' whereas record 2 could be ticked for all of them.

I have been trying to use these to make a search form. I want to be able to chose on ie. 'Round Bilge' and it will search for a record that is ticked 'round bilge'. I have done this for both a combo box and a list box and have used the formula for each field
[Forms]![Boatsearch]![hulltype]

When I have clicked run query I have an error message saying:
'This expression is typed incorrectly, or it is too complex to be evaluated. For example a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables'

Any ideas where I am going wrong?
Thanks
 
Put the (Unbound) check boxes on a form, check the appropriate check box(es) and building your form record source (or form filter) accordingly.

If you want to check for an "unchecked" checkbox. Use an option group for each "check box" with options -1, 0, and Null. Then build your form record source (or form filter) accordingly.

The latter method gives you the most flexibility. Adjust the form record source with the QBE frame, i.e,. the record source in the query design view.
 
Thanks for that - Just a quick question.
When you have multiple search boxes that don't need to be searched at once (I have 10 search boxes, boat only 1 is to be searched at once for example) do you put "*" & before and after the expression?
 
It depends on what you do with the combo boxes, if they're all used similarly on some event, reset those that are not needed. If the are bound to the form record source, again re-initialize those not relative. Etc.
 

Users who are viewing this thread

Back
Top Bottom