Having a command button open form in ADD mode

  • Thread starter Thread starter Spidey3721
  • Start date Start date
S

Spidey3721

I am trying to get a command button on one of my forms to open another form
in ADD mode. I have gotten it to work by adding "acformadd" as an argument
(?) to the end of my DoCmd in Visual Basic. It works fine

DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd


QUESTION - Is this the only way to accomplish this, or is there an easier
way to set this up ?
 
Spidey3721 said:
I am trying to get a command button on one of my forms to open another form
in ADD mode. I have gotten it to work by adding "acformadd" as an argument
(?) to the end of my DoCmd in Visual Basic. It works fine

DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd


QUESTION - Is this the only way to accomplish this, or is there an easier
way to set this up ?

It's one line and it works. Just how much easier than that do you want?

You can set DataEntry to True in the form's design and make that the
default, but then you would need a line similar to above when you DON'T
want ADD mode.
 
Back
Top