Conditionally lock record

giovi2002

Registered User.
Local time
Today, 13:38
Joined
Apr 12, 2005
Messages
83
OS/Program :xp/Access 2002

The following problem. Within my main form I have a status field. Dependent of the status of the main field I would like to lock the total record in my sub form at once. Within which event of the sub form could I achieve this and which property locks a total record?

thanks
giovi
 
try this on the onCurrent event

Code:
If Me.FieldName = "Enter Status Here" Then
Me.RecordLocks = True
Else 
Me.RecordLocks = False
End If
 
Yep I got it working like this:
If Me.FIELDNAME1 = [FILL IN YOUR CRITERIA] Then
Me.FIELDNAME2.Locked = True
Else
Me.FIELDNAME2.Locked = False
End If

(In this example fieldname 1 is different than fieldname 2)
Remark: you can't reference a field in a form higher than the current one (I didn't manage), what i did is copying the status field in the same form as the locked fields. I did it by using a query.

I used the code in the onclick event

Thanks
 
Last edited:

Users who are viewing this thread

Back
Top Bottom