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

Unwanted Message box when applying filter 1

Status
Not open for further replies.

Fr33dan

Programmer
Jun 28, 2007
79
0
0
US
Hi. I've been working on a database for awhile now and I have a button on a form that is supposed to apply a filter based on criteria from the user. However when I actually go to apply the filter in the code I get an message asking to input the value for the filter even though I stated it in the code.
Code:
FileName = ("AutoNumber=" + numbers)
MsgBox (FileName)
Me.Filter = FileName
Me.FilterOn = True
The message box call is just something I added to debug it. If I type in the value that is returned manually the filter works as it's supposed to. I've also tried using DoCmd.ApplyFilter but i get the same error. Thanks in advance for your help.
 
The underlaying query/table of the form has a numeric field called AutoNumber ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Well After reading your post I thought "Thats so simple it just might be the problem". The name of the field in the table is Auto Number not AutoNumber. Thank you very much for helping fix my own stupidity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top