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

applyFilter problem

Status
Not open for further replies.

nicktred

Programmer
Jan 2, 2004
20
GB
HI

im trying to filter a record set in a form and but doesnt seem to like the ApplyFilter function any ideas

DoCmd.ApplyFilter , "customer_id = '" & customer_id.Value & "'"

Cheers

Nick
 
Is the customer_id a string value? Because that is what you are asking for. To search for numeric entries:

DoCmd.ApplyFilter , "customer_id = " & customer_id.Value

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
If it's numeric, remove the text qualifiers.

[tt]DoCmd.ApplyFilter , "customer_id = " & customer_id.Value[/tt]

- else tell whats not working, error messages...

Roy-Vidar
 
- must have been at the same time (and I did hit refresh;-))
 
Thanks alot that did it thought it would be something simple like that.

Thanks again

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top