T
ThomasK via AccessMonster.com
Im trying to block users access to certain fields unless another field (combo
box) contains the word "complaint". The combo box "InspectionType" is on one
page (Inspection Information) of a tab control and all the fields that I dont
want users to access are on another page (Complaint Information) of the
control. I tried putting this into the On Click event of the tab on the
Complaint Information page, but it didn't do anything.
Private Sub Form_OnClick(Cancel As Integer)
If Me!InspectionType <> "Complaint" Then
MsgBox "If this is a Complaint then enter Complaint in the Inspection Type
field!"
Cancel = True
Me!InspectionType.SetFocus
End If
End Sub
My thought was that the page could not be accessed unless the InspectionType
was Complaint. It would take the focus back to the control until it was set.
Thanks for the help.
box) contains the word "complaint". The combo box "InspectionType" is on one
page (Inspection Information) of a tab control and all the fields that I dont
want users to access are on another page (Complaint Information) of the
control. I tried putting this into the On Click event of the tab on the
Complaint Information page, but it didn't do anything.
Private Sub Form_OnClick(Cancel As Integer)
If Me!InspectionType <> "Complaint" Then
MsgBox "If this is a Complaint then enter Complaint in the Inspection Type
field!"
Cancel = True
Me!InspectionType.SetFocus
End If
End Sub
My thought was that the page could not be accessed unless the InspectionType
was Complaint. It would take the focus back to the control until it was set.
Thanks for the help.