I'm having trouble finding the problem with the code below. It is in a subform, and I am trying to disable and lock fields based on the [Printed] check box (if yes (or checked) then lock fields). It seems that no matter what I do, the fields are either locked or unlocked, for both checked and unchecked boxes, not triggering on the criteria. Any help would be much appreciated.
Thanks,
Ian
Private Sub Form_Current()
If [Printed] = -1 Then
Purchaser.Locked = True
Purchaser.Enabled = False
CustNo.Locked = True
CustNo.Enabled = False
Recipient.Locked = True
Recipient.Enabled = False
Printed.Locked = True
Printed.Enabled = False
End If
If [Redeemed] = -1 Or [Refunded] = -1 Then
Redeemed.Enabled = False
Redeemed.Locked = True
Refunded.Enabled = False
Refunded.Locked = True
End If
End Sub
Thanks,
Ian
Private Sub Form_Current()
If [Printed] = -1 Then
Purchaser.Locked = True
Purchaser.Enabled = False
CustNo.Locked = True
CustNo.Enabled = False
Recipient.Locked = True
Recipient.Enabled = False
Printed.Locked = True
Printed.Enabled = False
End If
If [Redeemed] = -1 Or [Refunded] = -1 Then
Redeemed.Enabled = False
Redeemed.Locked = True
Refunded.Enabled = False
Refunded.Locked = True
End If
End Sub