How to get the value of WhereCondition from OpenForm

Posted on 2011-05-11
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
Question by:leeroypitre
    LVL 12

    Expert Comment

    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.

    LVL 16

    Accepted Solution

    Assign it to a parameter and then obtain it.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now