Cant lock record HELP! (1 Viewer)

bonekrusher

Registered User.
Local time
Yesterday, 21:43
Joined
Nov 19, 2005
Messages
266
Hi All, I've searched the forum and have found a lot of info on locking records/forms. I pulled this from a thread but it doesnt work. I have a subform with many fields with a check box. if the check box is true then I want to lock that record(or the form). I loaded this in the on current event and I can still edit the form and or record.

Code:
if me.closed = - 1 then

Me.AllowEdits = No
    Me.AllowDeletions = No
else

Me.AllowEdits = yes
    Me.AllowDeletions = yes

thanks
 

rborob

Registered User.
Local time
Yesterday, 21:43
Joined
Jun 6, 2006
Messages
116
me.closed = -1?
isnt that supposed to return a boolean (true, false, 1, 0)
you tried it with me.closed = 1? or me.closed = true?
 

bonekrusher

Registered User.
Local time
Yesterday, 21:43
Joined
Nov 19, 2005
Messages
266
ok I'll try, but I thought check boxes returned values of 0 and -1????
 

Users who are viewing this thread

Top Bottom