Change the DataMode of a Form (?)

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?
 
M

Maurice

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?
 
P

Paul Shapiro

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
 

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