Link to home
Start Free TrialLog in
Avatar of leeroypitre
leeroypitre

asked on

How to get the value of WhereCondition from OpenForm

DoCmd.OpenForm(FormName, View, FilterName, WhereCondition, DataMode, WindowMode, OpenArgs)

the WhereCondition is working fine, but what I need to know is how to access the value of the WhereCondition once the form loads so I can use the value elsewhere
Avatar of danishani
danishani
Flag of United States of America image

How did you define the WhereCondition?

In your Form or as a Variable?

When you declare the Where condition like this:

Dim WhereCondition As String

WhereCondition = "[FieldName]=" & Me.Fieldname2

You can use this anywhere in the same Form.
If you want to use this outside the Form as well, then declare a Public Variable.

HTH,
Daniel
ASKER CERTIFIED SOLUTION
Avatar of Anastasia D. Gavanas
Anastasia D. Gavanas
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial