Pre-POpulate form 2

accessir

New member
Local time
Today, 04:49
Joined
May 20, 2010
Messages
8
Hi All

I have 2 forms whereby one piece of info I hold on the first form is sometimes the same as that on the 2nd form but not always thus, what I want to do is this:

USER COMPLETES FORM 1 in full...no problem
USER then (optionally, doesnt always happen) presses my command button to launch FORM 2
...I want to take the value entered on form 1 in the field "handyinfo" and pre-populate the field titled "usefulinfo" on form 2....

Also, based on a flag on form 1, I might want to pre-populate a hidden field in Form 2 with the number 1 - I assume that would work in the same way but I cannot figure this out.

Cheers

I've tried storing the value in a variable but cannot do anything with this value once the button is clicked so it does quite happily launch form 2 but the field "usefulinfo" is NOT pre-populated....this is what I need to sort so hoping soneone can help!!!

Cheers...
 
Create public variables for the data you want to transfer over from one form to the next. On form2_open, put "[textbox].text=variablename", should work OK.
 
Cheers...I'll use this and see what I can come up with.

Thanks
 
You can also use the OPENARGS argument on the open event for transferring data between forms ...
 
Another method to perform a test on the on load event of form 2

Code:
If IsLoaded("Form1") Then
   Me.UsefulInfo = Forms("Form1")("UsefulInfo")
End If
 

Users who are viewing this thread

Back
Top Bottom