Locking A Record in a Form

  • Thread starter Thread starter DjinnRutger
  • Start date Start date
D

DjinnRutger

I have a Tabular Form that pulls records from a query based on the
date. This way i can pull up all activity for any day and see what was
recorded in my database. I have some fields that contain $ amounts and
once they are set i do not want anyone able to change that record. My
thoughts where to add a field "Lock" as number and set it up on the
form as a check box. Is this the right idea? and how do i have access
check to see for each record in the form if it should be locked or not?
or is there a better way?

Thank You.
 
I have used functions similar to what you describe to lock records. For
this you can use conditional expressions in the Form OnCurrent propery
to check for values in your database that would determine if a record
needed to be locked. Then if that condition was met you could set the
Form Allow Edits property to No. Using the OnCurrent property it would
run this check everytime you changed records. Now if you need to
manually lock a specific record, you could use a checkbox field turn
the edit function on or off and iIn that case you would want to make
this field invisible. You could double-click somewhere on the form to
make the field visible, check it, and double-click to make it invisible
again. If you need real security, you could protect the lock function
with a password. As you may know you can also lock and specific fields
in a form keeping the others editable. To begin with tell me what logic
you would use to determine if a record is automatically locked. If you
could supply table and field names that would help greatly.
 
Back
Top