Passing variable values

Stuart Green

Registered User.
Local time
Today, 08:35
Joined
Jun 24, 2002
Messages
108
This must be easy but I am an old DataEase hand trying to make the great leap into Access and visual basic.

I have a form with an input box on it. Users type in a number and then click a button. The code behind this click action makes the input typed into a variable value. It then does some comparisons of this variable value to other tables. If it passes the comparison a new form is opened. What I want is the value of the first validated input to be immediatley posted to a field in this second form so that the user does not have to retype it (and therefore make all the previous validation useless). My attempts so far have not been very good as it does not seem to like passing this value from one form to another
 
Usually you would do somthing like this:

Me!TextFieldName2.Value = Forms!Form1Name!TextFieldName1.Value

Where Me replace Forms!Form2Name

However both of your forms must be loaded. Make sure to turn the visibility property to false and not unload your form if you don't want it to be visible.
 
Thanks Mario, that worked just like I wanted it to
 

Users who are viewing this thread

Back
Top Bottom