lock records using option buttons

  • Thread starter Thread starter bpolite
  • Start date Start date
B

bpolite

I have a subform with the following fields:

Item
Location
Price
Description
Comments
Date Modified
Time Modified
Comments
Decision

The Decision field is linked to an option group with 3 check boxes labeled
Accepted,Declined and Rejected. Is there a way to lock an individual record
after one of the check boxes have been chosen so that the information cannot
be edited? Then unlock the record in a password protected way so the
information can again be edited? I would really appreciate some help with
this issue.

Thanks So Very Much
bpolite
 
I have a subform with the following fields:

Item
Location
Price
Description
Comments
Date Modified
Time Modified
Comments
Decision

The Decision field is linked to an option group with 3 check boxes labeled
Accepted,Declined and Rejected. Is there a way to lock an individual record
after one of the check boxes have been chosen so that the information cannot
be edited? Then unlock the record in a password protected way so the
information can again be edited? I would really appreciate some help with
this issue.

Thanks So Very Much
bpolite

You can change the AllowEdits property of the subform when the option
group is updated. You would need to re-evaluate the "rule" in the
OnCurrent event of your form, because you need to unlock the
individual records.

Private Sub cmdDisableEdits_Click()
Me.AllowEdits = Not (Me.AllowEdits)
Me.Requery
End Sub

Private Sub Form_Current()
If Not IsNull(Me.cboDecision) Then
Me.AllowEdits = (Me.cboDecision.Value = 1 Or
Me.cboDecision.Value = 2 Or Me.Decision.Value = 3)
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Record Locking 2
Lock and Unlock a form 5
Locking forms 9
Word Lock specific drop downs on a Word Document 0
Command Button 2
Record Lock 6
Display Warning if Record Locking 11
Locked Records 2

Back
Top