INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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

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

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

(OP)
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?

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

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.

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

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close