command button operation

F

freelancer

I want to close a form and open another form at the same time but the command
buttons only seem to allow me to do one operation or the other; either close
the form, and display the form below it, or open the form I want to view but
have the original form floating on top. Is there anyway I can have both
features run at the same time, so I can close a form and at the same time
open anther form? I assume there is an expression that can be built. I have
tried cutting/pasteing the two expressions together but this has not worked
thanks for the time

Clive
 
N

Nikos Yannacopoulos

Clive,

The code behind the command button's Click event should be something like:

DoCmd.OpenForm "NameOfFormToOpen"
DoCmd.Close acForm, Me.Name

HTH,
Nikos
 

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