Filter from Combo Box Value List

T

travs0626

I am trying to filter records matching value from combo box selection.
Structure is so:
Form - Header contains 3 unbound combo boxes all with Value Lists
Form - Detail contain fields from small table
I want to allow user to select first combo box value and filter the records
by one field based on the value they select, then from that filtered records
list select combo box two and filter again by another field and same with
three. Not sure this is possible or if Macro is best way to accomplish this.
Macro for first combo box is:
Action Arguments
SetTempVar ActiveControlValue, [Screen].[ActiveControl]
ApplyFilter (Where) = "[Vendor]="
&[TempVars]![ActiveControlValue]
RemoveTempVar ActiveControlValue
[Vendor] is the first field on Form that I am filtering by. When I select a
value from the combo box I recieve the popup to "Enter Parameter Value"
Any help is appreciated. Thanks.
 
S

Steve Schapel

Travs,

I don't think using the TempVar is the best approach. Just use the
SetValue action in your macro, and set the Where Condition argument to
the equivalent of this:
[Vendor]=[Forms]![NameOfYourForm]![NameOfYourCombobox]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top