Open form for add/edit records

A

Alan T

I have a button on the main form:

DoCmd.OpenForm "frmEmployee", acNormal, , , acFormEdit, acWindowNormal

I can still add record by clicking the * on the record selector.
So what is the difference:
DoCmd.OpenForm "frmInvoice", acNormal, , , acFormAdd, acWindowNormal ?
 
M

Maurice

Depends on what you want to do. If you don't want users to add any records
then set the form to read only (is also one of the options).
 
M

missinglinq via AccessMonster.com

The difference is that acFormEdit allows editing AND adding of new records
(as you've found out) while acFormAdd ONLY allows adding new records, just
as setting the Dtat Entry Property to YES would.
 
Top