Multiple events in a command button

O

Olu Solaru

I have a command button(cmd_submit) on form. This command button basically
adds selected fields from the form to another table. This part works fine.
Want I want to know is - Can I also add another procedure within the same
code(cmd_submitclick()) that will open a Reports form for example.? I can
figure out how to open the forms reports, I just want to know how to
implement the procedure within the same code(cmd_submitclick()).
 
R

Robert Morley

Looking at the code in the other thread, I think I see why you might be
having problems.

Add your DoCmd.OpenReport command just before where you have the DoCmd.Close
line. Then change the DoCmd.Close line to:

DoCmd.Close acForm, Me.Name

....always a good habit to specify which form to close, otherwise it'll
simply close the window that has the focus, which would be the report window
you just tried to open up.



Rob
 

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