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

DoCmd.ApplyFilter Issue

Status
Not open for further replies.

obheron

Technical User
May 25, 2005
40
US
I keep getting a syntax error with this line of code.
Any suggestions?

DoCmd.ApplyFilter([FruitFilter],[Forms![Fruits]![Fruit]= "Apple")])
 
I'd try this:
DoCmd.ApplyFilter , "Fruit = 'Apple'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Tried that line and no error. But also no filter. :(

The filter event is the result of an option button being clicked. I am trying to apply the filter to a subform, in the form the option box is.

Any suggestions?
 
Something like this ?
With Me![subform control name].Form
.Filter = "Fruit = 'Apple'"
.FilterOn = True
End With

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top