Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking Fields/Records in a Datasheet

Status
Not open for further replies.

sms28

IS-IT--Management
Dec 10, 2002
19
US
I have a project tracking database where resources enter activity for project tasks in a task weekly tracking table. Here's the data entered: date of entry, status, and comments. When project managers review these resource entries, they want the option to indicate that the entry is approved. When the entry is approved, the resources cannot update the data entered. What's the best way to accomplish this?

Thanks in advance.
 
If it is being done on a form you can lock the controls in the On Current event based on the value of the approved field.

I'm assuming that the approved field will be a Yes/No.

If Approved (whatever the field name is) then
EntryDate.Locked = True
Status.Locked = True
Comments.Locked = True
Else
EntryDate.Locked = False
Status.Locked = False
Comments.Locked = False
End If

Put this code in the form's On Current event. This will test the value of approved whenever the record is changed and set the controls appropriately.

HTH

Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top