Ted,
I'll try to help, but I need to see your code... along with a deatiled
description of WHERE and HOW you entered that code.
Do you have any experience with writing event code in the form module?
Let me review the procedure just in case... I'm using the name Locked...
you use your own field name.
In design view, select the Locked field.
In the Properties box for Locked, find the AfterUpdate event, and
place
your cursor in it.
Use the little arrow on the right to select Event Procedure from the
list.
Now click the little button on the right with 3 dots ...
You are now in the form module, and should see...
-------------------------------------
Private Sub Locked_AfterUpdate()
End Sub
-------------------------------------
Place the code I gave you between those 2 lines...
--------------------------------------
Private Sub Locked_AfterUpdate()
If [Locked] = True Then
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If
End Sub
-------------------------------
Just try that... in Form view set Locked to True, and see if you can
edit the record afterwards.
Do the same procedure for the OnCurrent event of the Form.
Hang in there...
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
Ted Clore said:
I give up. I have tried this any which way, and I am still not able to do
anything. Usually get an error message that says event can not contain
comments.
Thanks for your help Al, I just am not savvy enough with Access to do
this.
Thanks again,
Ted
Let's say your checkbox is named Locked, bound to field Locked in your
table.
Use this code in the AfterUpdate event of [Locked]...
Private Sub Locked_AfterUpdate()
If [Locked] = True Then
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If
End Sub
Use this code in the OnCurrent event of the form itself...
Private Sub Form_Current()
If [Locked] = True Then
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If
End Sub
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
I am a Access dummy, could you be a little more specific please. I am
not sure what you mean below.
Thank you Al.
Ted
Use the AfterUpdate event of your checkbox to turn the form's
AllowEdits = False.
Also, you'll need to use the OnCurrent event to check the value of
the checkbox, and turn AllowEdits to True or False accordingly.
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
I would like to turn off all fields when a check box is checked so
no
more data can be entered into a record.
Suggestions?
Thank you.
Ted Clore