Record! Not Enabled

mous

Registered User.
Local time
Today, 18:54
Joined
Sep 26, 2001
Messages
109
Can anyone please tell me how I make certain records ot enabled.

I have a tick box that indicates when a record is complete. I do not then want a user to go in a change its details.

I can do a Me. [field].enabled = False but this does all record.

Thanks for your help.

Dawn
 
Have you tried something like


If Me.chk = True Then
Me.AllowEdits = False
MsgBox "No edits allowed", vbOKOnly

End If

Hope that helps


Steve
 
Dawn,
I'm assuming that you don't want to "lock" the field. What condition must be met for you to lock the field. If the tickbox must be filled in, then use and IF Statement to say

If (Me.tickfield)=(-1) Then
'Checks to see if the field is true or in your case "Complete"
Me.tickfield.locked = true
'Now Prevents the user from editing the field
EndIf

hope this is what you were looking for!
 
Sorry, I've tried this on the On current form and before update on each field. It's works once OK but when I move to my "Editable" next record it won't let me type anything in.


Thanks Dawn
:confused:
 
Think that you will need to put in an else me.allowedits = true in to the if loop.
Also you will need store the value of the tick box in your table so that on a new record it is defaulted to not ticked.

The problem with doing it that way is that once the box is ticked then you need to have a command button or something to set the form to allowedits and reset the chk box.
Hope that this helps you
 

Users who are viewing this thread

Back
Top Bottom