Form processing

T

tiger

Hi,

I created a form, with a button on it...

What I am trying to do is, when the button is click another form is launch,
and I will like to write a text to the textbox on the new form.

Thanks
 
T

tina

you can use the OpenForm action in the button's OnClick event procedure, and
add the text to the OpenArgs argument of the action, as

DoCmd.OpenForm "FormName", , , , , , "some text"

see the OpenForm topic in Help for specific details. in the form that opens,
you can add code to the form's Load event procedure to assign the value of
OpenArgs to a textbox on the form, as

Me!TextboxName = Me.OpenArgs

hth
 
S

Steve Schapel

True. Alternatively...

DoCmd.OpenForm "FormName"
Forms!FormName!TextboxName = "some text"
 
Top