Sort Subform by ComboBox Help Please?

  • Thread starter Thread starter K
  • Start date Start date
K

K

Good day, I am trying to sort a subform based on a combo Box afterUpdate Event.

Details......

Main Form Name = frmSearch (Combo Box Name = ComboAlloy)
Subform Name =SubfrmSearch (Underlying Query Name = qrySearch

Macro Name = Filters:Alloy
Apply FIlter = qrySearch
Where Condition
[tblQuoteHeaderSub.AlloyType]=[Forms]![frmSearch]![ComboAlloy]

However it isnt working..Can someone help me with this. Not sure what I am
doing wrong. I get Action Faoled and a message "The action or Method is
invaild because the form or reports isnt bound to a table or query"....

Any help would be appreciated.

Thanks, Kyle.
 
Kyle,

The main problem here, I think, is that you are trying to apply the
ApplyFilter macro to the subform, but the criteria and macro event are
related to the main form.

Also you should note that for the ApplyFilter macro action, you use the
Filter Name argument *or* the Where Condition argument, not both.

What do you have in the qrySearch query? This is the Record Source of the
subform, and I would suggest writing the reference to the ComboAlloy
combobox into the query criteria. And then just use a Requery action in the
macro instead, to update the records displayed in the subform.
 
Back
Top