Sohaila Taravati
Registered User.
- Local time
- Today, 23:17
- Joined
- Oct 24, 2001
- Messages
- 266
I have a button called Approved on my form. when the user presses it would put a check mark in a field. I want my button to be disabled when they click the button. This is my code:
Private Sub ButtonApproved_Click()
Approved = -1 'Sets field to yes
ATimestamp.Locked = False 'Allow edits
ATimestamp = Date 'Set time
ATimestamp.Locked = True 'Lock feild again
If (Me.Approved = -1) Then
Me.ButtonApproved.Enabled = True
Else
Me.ButtonApproved.Enabled = False
End If
End Sub
But it dosen't work. What am I doing wrong?
Thank for your help in advance.
Private Sub ButtonApproved_Click()
Approved = -1 'Sets field to yes
ATimestamp.Locked = False 'Allow edits
ATimestamp = Date 'Set time
ATimestamp.Locked = True 'Lock feild again
If (Me.Approved = -1) Then
Me.ButtonApproved.Enabled = True
Else
Me.ButtonApproved.Enabled = False
End If
End Sub
But it dosen't work. What am I doing wrong?
Thank for your help in advance.
