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

Filter to open form only works when the filter value is hard coded.

Status
Not open for further replies.

bigdavidt

Programmer
Feb 12, 2004
52
US
I am working on a form that has a button to open another form. The code that opens the other form applies a filter, but the filter only works when the filter value is hard coded. I can get the value to be used and save it in a variable, but when I use the variable the other form opens with no record showing. Has anybody run into this? What was your solution?
 
This is a pretty standard task, so provide your code so we can see what you are doing wrong. You should be able to open any form filtered the way you want.
 
I actually found a solution. I removed criteria from the query itself and relied more strictly on the filtering in my VBA code. The query criteria were somehow ending up in my filter criteria in the form I was trying to open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top