Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering Records expert question

Status
Not open for further replies.

GESALO

Programmer
Jan 23, 2001
2
SA
Problem in filtering records based on multiple fields :

1. In our Form called “Customer Profile” there are four Combo boxes, all the values selected in these boxes are from a single source table called “Trade Fair Profiles”.

We are Unable to get the records to a subform based on these four different fields by selecting a value from the combo box based on the table “Trade Fair Profiles”.

We get records to the subform for only one field among the four.

We would like to get all the records related to the value selected in all the four boxes.


It is possible only if we create four different subforms which is not full solution and further we are unable to merge these records into a single table or report.
 
I assume that you want to "AND" the combo boxes to form a single soloution. Place a [Parameter] in each of the fields in your query. If you always require all four parameters, just make the parameter the combobox itself.

Otherwise, you need to do some code. You will need four variables to hold either the combobox text, or an asterisk ("*") to place in the parameter variable for each combobox to be used. The latter is the only part of your request which provides any challenge, as you need to decide on the criteria and methodology for designating that a combobox is not to be used in the execution. the simplist of these would be to use a ckeckbox control for each of the comboboxes. Default to checked (On | True}. If "UnChecked", then substitute the "*" for the combobox text.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Sounds like you might want to OR the selections. In that case follow Michael's instructions but put the parameter on a different criteria line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top