Pass a filter variable from one form to another

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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.
 
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
 
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]
 
Back
Top