Put this expression in a standard module:
Public MyVariable As String '(or As Integer, or As Long depending on the
datatype of what's in the textbox)
On Form1:
MyVariable = Me!NameOfTextbox1
On Form2:
Me!NameOfTextbox2 = MyVariable
OR ----------
If Form1 is open at the same time Form2 is open, skip all of the above and
put the following in the Open event of Form2:
Me!Textbox2 = Forms!Form1!Textbox1
Note - Form1 can be not visible and this will still work.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Brandon Coates via AccessMonster.com said:
I want to save what is in a textbox on a form into a variable so it can be
placed into a different textbox on another form when the button is clicked.
Are there any other ways to get this value from one form to another?