Solved

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

Posted on 2016-11-09
2
53 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

615 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