?
Solved

How to get the value of WhereCondition from OpenForm

Posted on 2011-05-11
2
Medium Priority
?
307 Views
Last Modified: 2012-05-11
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
Comment
Question by:leeroypitre
2 Comments
 
LVL 12

Expert Comment

by:danishani
ID: 35741562
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
 
LVL 18

Accepted Solution

by:
xtermie earned 2000 total points
ID: 35753830
Assign it to a parameter and then obtain it.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question