Solved

how to get value from an object on another access form for global variable

Posted on 2016-11-09
2
26 Views
Last Modified: 2016-11-10
I have a main form  that when open, i'm wanting to set  a global  variable


LABEL_CURRENT_REVIEW_DATE   is a label on  "RUN_BUILD_FORM"

In a module:
Global CSP_REVIEWDATE_CRITERIA  As String



On my main form load event
Private Sub Form_Load()
' this is the main form loading at startup
CSP_REVIEWDATE_CRITERIA = Forms!RUN_BUILD_FORM!LABEL_CURRENT_REVIEW_DATE
End Sub


I cant seem to get the code correct to grab the current value on the form. "RUN_BUILD_FORM"


Thanks
fordraiders
0
Comment
Question by:fordraiders
2 Comments
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41881073
I'm not sure what you want from a label.  The only property that makes sense in this context is the caption property:
CSP_REVIEWDATE_CRITERIA = Forms!RUN_BUILD_FORM!LABEL_CURRENT_REVIEW_DATE.Caption

BUT, the caption is static.  Are you sure you don't want the value of the textbox the label is attached to?

CSP_REVIEWDATE_CRITERIA = Forms!RUN_BUILD_FORM!thetextboxname
0
 
LVL 3

Author Closing Comment

by:fordraiders
ID: 41882902
thnx
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

760 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

17 Experts available now in Live!

Get 1:1 Help Now