Open form to new record

R

Ronald Marchand

Hello all:

Is there a way to control a form such that when it is opened, the index is
positioned to add a record rather than display the current (first or any)
record?

Ron Marchand
 
F

fredg

Hello all:

Is there a way to control a form such that when it is opened, the index is
positioned to add a record rather than display the current (first or any)
record?

Ron Marchand

Always open that way?
Set the Form's DataEntry property to Yes

If only when opened from a command button on anther form (or
otherwise), try:

DoCmd.OpenForm "frmName", , , ,acFormAdd
 
R

Ronald Marchand

Thanks for the reply.

These methods do not allow existing records in the table to be accessed.
They are data entry modes.

I want the index to be placed as if the [--> *] button was clicked in the
record selector.

Ron Marchand
 
F

fredg

Thanks for the reply.

These methods do not allow existing records in the table to be accessed.
They are data entry modes.

I want the index to be placed as if the [--> *] button was clicked in the
record selector.

Ron Marchand

fredg said:
Always open that way?
Set the Form's DataEntry property to Yes

If only when opened from a command button on anther form (or
otherwise), try:

DoCmd.OpenForm "frmName", , , ,acFormAdd

OK, so you wish to open the form normally (show all records and allow
editing, etc.), but start at the new record position.

Code the Form's Open event:
DoCmd.RunCommand acCmdRecordsGoToNew
 
Top