Locking Records

  • Thread starter Thread starter dbl
  • Start date Start date
D

dbl

Hi is it possible to lock a record with a tick box, then un tick it to make
any changes, then re-tick it to lock it again?

The reason for this is because I view a lot of the records using (Find) and
occasionally I type over the data instead of typing in the Find box. I only
make changes to these records occasionally.

Or is there a better way of sorting out the above problem?

Bob
 
Bob,

Are you doing this though a form? If yes, then you can do it without
changing your table design. Just set the form's Allow Edits property to No,
and add a command button on it with the following code behind it:

Me.Form.AllowEdits = Not Me.Form.AllowEdits

The button will toggle AllowEdits, so you van enable edits only when you
purposely click it, and disable them again as soon as you have saved your
changes.

HTH,
Nikos
 
Nikos thanks that works fine.

Thanks Bob
Nikos Yannacopoulos said:
Bob,

Are you doing this though a form? If yes, then you can do it without
changing your table design. Just set the form's Allow Edits property to No,
and add a command button on it with the following code behind it:

Me.Form.AllowEdits = Not Me.Form.AllowEdits

The button will toggle AllowEdits, so you van enable edits only when you
purposely click it, and disable them again as soon as you have saved your
changes.

HTH,
Nikos
 
Nikos it works but it also disables all the other controls on the form,
how do I get the controls to work but lock the records?
Bob
 
Bob,

You've lost me here. You want to disable changes to the data, but at the
same time you want the controls to work? What do you mean? What kind of
controls, and "work" as in...??? Can you please explain?

Nikos
 
Back
Top