Command Button

S

Sarah

Hi, I am just starting out using Access, my question is, i am creating a
quotation system for my manager. What i am trying to do with the command
button, is to use a macro to open the next form, which works well, i have one
from called gas cylinder installation, which then opens another form
Contractors, then Consumables etc. My problem is when i start the process
again to link the Contractors form to another form it already has the
original macro attached and goes back to the original form? How do i make it
go to various forms? If you could help that would be great. Thanks Sarah
 
K

Ken Snell

The OpenForm macro action has an argument for the Form Name. That is where
you would put the name of the form that you want to open. If you want to
have a different form from another form, you will need to have separate
macros, one for each form to be opened, and use the appropriate macro that
you need.
 
S

Sarah

Hi Ken,

Thanks for that, but if i am using the same form for various reason, and i
have already attached a macro if i change that to work for another form how
will it work for the old form? Sorry not really good on all this stuff.....
Should i be writing VBA code for the form to go to another form?

Thanks
 
K

Ken Snell

You can have different macros on the same form; just use different command
buttons to run each separate macro.

Or, perhaps I'm not understanding what you want to do? Are you wanting to
use one command button only, and to have that button cause different forms
to be opened? If yes, how will the button know which form is to be opened?
 
S

Sarah

Oh now that makes sense... sorry have been having a "dumb" moment for awhile
now, i didnt even think of adding another button.... that works really
well.... one of the people here tryed to help me, told me to do a whole new
form for everytime i want to use it for a different form...... That is great
really appreciate your help, Have a great weekend Thanks sarah from Australia
 

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