Passing variables form to form

lcline

Registered User.
Local time
Today, 10:26
Joined
Oct 23, 2001
Messages
53
I have two forms. FormA contains several dropdowns and a cmd to open a popup form (FormB) that contains a calendar. I created a module called modGlobalVariables (from post from Chris RR)in it I have Public CalSelDate.

Within a cmd button on FormB I then set CalSelDate = Me.ActiveXCal1. Then closed FormB (the variable is now held in CalSelDate). I now need to populate a text box with that value. But I can't think of another way to do this without creating another button to put the event in. Is there a way to close FormB and pass CalSelDate to a text box in one fail swoop?
Thanks in advance for any help rendered!!
Lee
 
Put an unbound text box on formB use the code to populate it and use it's value when closing the form to do whatever you want
 
Rich,
I tried something like this:
' FormB cmdclick
Me.FormBtxt.value = Me.ActXCalFormB.value
Forms![FormA]![FormAtxt.Value] = Me.FormBoundtxt
' I then closed FormB. FormA was open all this time as FormB is a popup over FormA.
What am I missing?
Thanks,
Lee
 
You can use the OpenArgs property to pass data from form to form.
 

Users who are viewing this thread

Back
Top Bottom