Sort Subform by ComboBox Help Please?

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.
 
S

Steve Schapel

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.
 

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