Change the DataMode of a Form (?)

  • Thread starter Thread starter croy
  • Start date Start date
C

croy

I'd like a form to open in the "Add" mode, but I'd like to
have a button for changing into the "Edit" mode when
desired.

Is there a better way to do this than re-opening the form?
 
The normal way for opening a form is

DoCmd.OpenForm "student details", acNormal, , , acFormAdd

But i guess you know that already.
If you mean that you want to edit records you can adjust this to

DoCmd.OpenForm "student details", acNormal, , , acFormEdit

That way the users see the records where they can edit records.
is that what you mean?
 
croy said:
I'd like a form to open in the "Add" mode, but I'd like to
have a button for changing into the "Edit" mode when
desired.

Is there a better way to do this than re-opening the form?

In the OnClick event handler for your Edit button, include this line of
code:
Me.DataEntry = False
 
Back
Top