By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

Unwanted Message box when applying filter

P: 57
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.
Expand|Select|Wrap|Line Numbers
  1. FileName = ("AutoNumber=" + numbers)
  2. MsgBox (FileName)
  3. Me.Filter = FileName
  4. 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.

EDIT: I figured out the problem with the help of another forum. My field's name is Auto Number not AutoNumber. Thanks anyway.
Oct 23 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,494
Thanks for the update. It always helps to know :)

Welcome to Bytes!
Oct 24 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.