Pass a filter variable from one form to another

G

Guest

Filter questions seem to be thing today...

I have two forms. The first form lists all of our clients with certain
metrics (total filled, max time to work, etc) formatted as a continuous form.
Each client has a command button to allow the user to open another
continuous form that lists the detail behind the summary. I want the user to
be able to choose the client and have the detail form only show those clients.

For example, the user selects the NoelleCo button. The detail form opens
and only shows the detail for NoelleCo.

First, is that the best approach? Would this work better if I could pass a
variable to the WHERE clause in the SQL? If filtering is the best way, how
can pass that variable?
 
R

ruralguy via AccessMonster.com

You can specify a WhereCondition when you use the OpenForm command and that
will apply a filter to the RecordSet of the next form. Look at VBA Help for
the syntax.
 
G

Guest

That worked great. Thanks!

ruralguy via AccessMonster.com said:
You can specify a WhereCondition when you use the OpenForm command and that
will apply a filter to the RecordSet of the next form. Look at VBA Help for
the syntax.


--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

You're welcome. Glad I could help.
That worked great. Thanks!
You can specify a WhereCondition when you use the OpenForm command and that
will apply a filter to the RecordSet of the next form. Look at VBA Help for
[quoted text clipped - 14 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top