Dear Friends,
I have this access error 461 which tells compile error: method or data member not found. Please help me to fix the problem with my code here:
To explain further what's the problem on these codes: the field names:
[SE]
[SN]
[SBN]
[SUS]
[OTH]
[NM]
[DP]
are additional field names that I placed on the table, which I added also on my queries, reports, and forms. I have put two buttons in the form: the enable button and the lock button. The problem lies whenever I opened the form, only the old field names on my table were locked and those added new field names are not locked, even going through the codes that added field names were added in the code as shown above. What seems to be the problem? Thank you in advance.
I have this access error 461 which tells compile error: method or data member not found. Please help me to fix the problem with my code here:
Code:
Private Sub Command302_Click()
Command76.Enabled = False
INCIDENTREPORTSEQNO.Locked = True
[DATE].Locked = True
[CATEGORY].Locked = True
[AREA].Locked = True
[UNIT NO].Locked = True
[EQUIPMENT].Locked = True
[TIME].Locked = True
[TRIP].Locked = True
[FIRE].Locked = True
[DUMP].Locked = True
[RUPTURE].Locked = True
[EXPLOSION].Locked = True
[OTHERS 1].Locked = True
[POWER LOSS].Locked = True
[WATER LOSS].Locked = True
[PROPERTY DAMAGE].Locked = True
[PERSONAL INJURY].Locked = True
[OTHER CAUSE].Locked = True
[POWER GEN PRIOR TO INCIDENT].Locked = True
[POWER GEN AFTER THE INCIDENT].Locked = True
[WATER PROD PRIOR TO THE INCIDENT].Locked = True
[WATER PROD AFTER THE INCIDENT].Locked = True
[SE].Locked = True
[SN].Locked = True
[SBN].Locked = True
[SUS].Locked = True
[OTH].Locked = True
[NM].Locked = True
[DP].Locked = True
MsgBox ("All Data has been locked .... ")
End Sub
Private Sub Command303_Click()
' ask for password
strInput = InputBox(" Please Enter Password ", _
" Restricted area ")
If strInput = "" Or strInput = Empty Then
MsgBox " Please Enter Password ", , "Required Data"
Exit Sub
End If
If strInput = "123" Then
Else
MsgBox (" You are not athorized ")
Exit Sub
End If
INCIDENTREPORTSEQNO.Locked = False
[DATE].Locked = False
[CATEGORY].Locked = False
[AREA].Locked = False
[UNIT NO].Locked = False
[EQUIPMENT].Locked = False
[TIME].Locked = False
[TRIP].Locked = False
[FIRE].Locked = False
[DUMP].Locked = False
[RUPTURE].Locked = False
[EXPLOSION].Locked = False
[OTHERS 1].Locked = False
[POWER LOSS].Locked = False
[WATER LOSS].Locked = False
[PROPERTY DAMAGE].Locked = False
[PERSONAL INJURY].Locked = False
[OTHER CAUSE].Locked = False
[POWER GEN PRIOR TO INCIDENT].Locked = False
[POWER GEN AFTER THE INCIDENT].Locked = False
[WATER PROD PRIOR TO THE INCIDENT].Locked = False
[WATER PROD AFTER THE INCIDENT].Locked = False
[SE].Locked = False
[SN].Locked = False
[SBN].Locked = False
[SUS].Locked = False
[OTH].Locked = False
[NM].Locked = False
[DP].Locked = False
Command76.Enabled = True
' all field list you want to locked
End Sub
To explain further what's the problem on these codes: the field names:
[SE]
[SN]
[SBN]
[SUS]
[OTH]
[NM]
[DP]
are additional field names that I placed on the table, which I added also on my queries, reports, and forms. I have put two buttons in the form: the enable button and the lock button. The problem lies whenever I opened the form, only the old field names on my table were locked and those added new field names are not locked, even going through the codes that added field names were added in the code as shown above. What seems to be the problem? Thank you in advance.
Last edited by a moderator: