Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing textbox1.text (Form1) to textboxs.test (Form2) 2

Status
Not open for further replies.

xhuck28x

IS-IT--Management
Nov 25, 2003
12
US
I am going nuts. I figured this would be so simple but I'm having no luck.

Form1 contains a textbox and a command button. when the command button is pushed, form2 is to open and populate a textbox with the value from form1.textbox.text.

what is the simple code for this and can this be done using the macro builder.

peace.


 

I don't know how to use macro builders but the code I'll use on clicking the command button is:

DoCmd.OpenForm "form2"
Forms!form2!textbox = Forms!form1.textbox

Or else you can write the "Forms!form2!textbox = Forms!form1.textbox" code on the onOpen Event of form2
 
Here is the Macro

The 1st action would be
OPEN FORM fill in the form name and you can figure out the rest

Then the next acion would be
SET VALUE
item = [Forms]![Form2]![Form2 TextBox Name]
expression = [Forms]![Form1]![Form1 TextBox Name]





 
Great everyone....thankyou much!!!!!

peace.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top