Form processing

  • Thread starter Thread starter tiger
  • Start date Start date
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
 
tiger
try
DoCmd.OpenForm "TheNameofTheFormYouAreOpening"

regards

Marcel
 
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
 
True. Alternatively...

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top