turning edit mode on and off

  • Thread starter Thread starter DJ McNeill
  • Start date Start date
D

DJ McNeill

Hi,

I would like to open a form in browse mode then switch it to edit mode when
a user clicks a button. After saving I would like the form to go back to
browse mode.

How would I go about doing that.

P.S. I changed the property on the form to not allow edits yet it still
allows them, any idea why this might be happening.

Thanks
DJ McNeill
 
DJ said:
I would like to open a form in browse mode then switch it to edit mode when
a user clicks a button. After saving I would like the form to go back to
browse mode.

How would I go about doing that.

P.S. I changed the property on the form to not allow edits yet it still
allows them, any idea why this might be happening.


Not sure, but I think you want to use the the form's Current
event to lock the form's controls so their value can not be
changed:
Me AllowEdits = False
The code behind the command button can unlock the controls
using:
Me.AllowEdits = True

Note that you can not prevent changes to a record that is
alredy dirty. So make sure the current event does not
attempt to set the value of a control.

Also note that setting AllowEdits to False, will also lock
any unbound controls that you may be using to assist in
record navigation. If you need to enter a string in a text
box to search the form's records, then you will have to use
each control's Lock property instead of the form's
AllowEdits property,
 
Back
Top