I need an urgent help setting a query or macro in ACCESS to enable or disable a command button based on set criteria.
I have a form called "Entry Table" which contain the following:
1) 2 text boxes for users to enter customer ID and Ref number
2) 3 validation select criteria called
3) a command button called "command12". with onclick event procedure that allows varify1, varify2 and varify3 to atomatically select "yes" if the custmer ID and ref number is valid and "NO" if not valid. this part is working.
4) a text box called "validcheck" with the formula: iif([varify1]="yes" and [varify2]="yes" and [varify3] ="yes",1,0). This will mean that the customer ID and ref number is valid if varify1, varify2 and varify3 are selected yes.
5) a command button called "processmandate", which when "command12" is clicked, should enable only if "validcheck" = 1 and disable if "validcheck" = 0.
The problem is that the "processmandate" keep enabling regardless of if "validcheck" equals 1 or 0. PLEASE HELP!
Below is what I did but does not work, maybe i'm missing somthing:
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
Dim stDocName As String
stDocName = "Refresh"
If [ValidCheck] > "0" = True Then
Me.[processmandate].Enabled = True
Me.[processmandate].Enabled = False