open and close form with one OnClick

J

Jeff @ CI

I would like to be able to open a form by clicking a button, once that form
is open and a variable is transferred, I would like to close the original
form. I have tried to embed a DoCmd.Close acForm "formname", into a
"OnClick" event procedure, but I still have the first form open. Need it in
2000 format.

Thanks for any help!
 
J

Jeanette Cunningham

Jeff,
On the close button of form1st put this code

DoCmd.OpenForm "form2nd",,,,,,"value of variable"
DoCmd.Close acForm, Me.Name

Jeanette Cunningham
 

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

Top