• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

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
0
leeroypitre
Asked:
leeroypitre
1 Solution
 
danishaniCommented:
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
0
 
xtermieCommented:
Assign it to a parameter and then obtain it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now