combo box selection troubles

undergrad

Registered User.
Local time
Today, 07:31
Joined
May 29, 2003
Messages
25
this satement below sets the coolant field to what is in the combo box

[Coolant]=[Forms]![FrmParam]![CmBoxCool]

the combo box is unbound and is used to set criteria for a query. for some of the fields under coolant there is one type of coolant, but for others there is multiple like "H2O, Helium, Air" i want the pull down box to have only single choices, so if air is selected the query will go and pick all fields with air in the field at all regardless of the other enteries.

the above statement comes out of an iff statement. i was hoping to modifiy the above to accomplish my goal. is this possible?

thanks for any help
 
You can use the Like operator and the wildcard * instead of the equal sign. The basic syntax is:-

[Coolant] Like "*" & [Forms]![FrmParam]![CmBoxCool] & "*"


However, when CmBoxCool is left blank, the query will return every record that has a value in the field Coolant. If this is not what you desired, you can deal with this blank CmBoxCool situation in your iif statement.
 
thanks that worked great
 

Users who are viewing this thread

Back
Top Bottom