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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box filter will not work on subform

Status
Not open for further replies.

FredaH302

MIS
Dec 15, 2006
22
US
Hi,

I have a combo box that I want to use as a filter. The combo box works fine until I embed the form into another (as a subform). I am sure it has to do with how a control is referenced on subforms.

Here is the code as it exists now:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frm_Available_list"

stLinkCriteria = "[category]=" & "'" & Me![Cat_Search] & "'"
DoCmd.ApplyFilter stDocName, stLinkCriteria


Cat_Search = The combo box containing the above code.
Category = The field being filtered.

What is the proper way to reference the stlinkcritera ?
 
How are ya FredaH302 . . .

Have a look here: Refer to Form and Subform properties and controls

BTW: [blue]Welcome to Tek-Tips![/blue] To get great answers be sure to have a look at FAQ219-2884 or FAQ181-2886

Calvin.gif
See Ya! . . . . . .
 
This issue was addressed in FredaH's thread in the Access Modules (VBA Coding) forum: thread705-1313345

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top