DoCmd.OpenForm

L

L.A. Lawyer

I want to use this command to open a blank (ie, new record) form. The
default opens with all records. How do I make it open a new record?
 
J

Jim Allensworth

I want to use this command to open a blank (ie, new record) form. The
default opens with all records. How do I make it open a new record?
Use acFormAdd in the datamode argument.

DoCmd.OpenForm "frmMyForm",,,,acFormAdd

- Jim
 
V

Van T. Dinh

You can either set the DataEntry Property of the Form to Yes/True or you can
use the DataMode argument of the OpenForm Method like:

DoCmd.OpenForm "YourFormName", , , , acFormAdd
 

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