Open form in Add mode

G

Guest

Sometimes when in the middle of completing the input on a form, users find
they need to pause and add a new record to one of the tables - for example, a
shipping agent.
I have provided a cmd button (Add Agent) that opens the agent form and a
Close btn to take them back to the original form they were in. Fine.
However, the secondary form always opens already populated with an existing
record whereas for this particular usage I want it to be blank for adding a
new one.
I don't want to code something that will ALWAYS make it open in Add mode,
because the same form is used elsewhere for editing and maintaining the agent
records. It's only when fired from this particular button that I want it to
be in Add.
Thanks for your suggestions!
CW
 
G

Guest

In the open form command line you can specify how to open it

Docmd.OpenForm "FormName" , , , ,acFormAdd

acFormAdd, will make it to open as data input, remove it and it will open as
always

Docmd.OpenForm "FormName"
 

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