On_Click event of Tab Control
Hi. This is frustrating the hell out of me.
I am trying to use the on_click event of a tab control in order that a user must first authenticate themselves to view the second tab (which contains sensitive information).
I click on the tab in for the sensitive info in design view and use the on_click event to write my code. When I click on the tab in form view nothing happens. I put in a breakpoint to debug but it doesn't look like it's even calling my procedure.
I have 2 tabs: one called client details and one called sensitive information. Here is my code:
Private Sub Sensitive_information_Click()
Dim strPassword As String
Dim strEnterPassword As String
Dim intPasswordCount As Integer
intPasswordCount = 1
strPassword = "cfspass"
strEnterPassword = InputBox("Enter Password to view/add sensitive information", "Enter Password")
Do While intPasswordCount <= 3
If strPassword <> strEnterPassword Then
MsgBox "You have entered an incorrect password. You have " & 3 - intPasswordCount & " attempts remaining.", vbRetryCancel + vbCritical, "Incorrect password"
intPasswordCount = intPasswordCount + 1
Else
MsgBox "blah"
intPasswordCount = 5
End If
Loop
End Sub
Now I'm not too bothered about the security issue of including the password in my code because I can sort that out later. I am more interested in hwy the code isn't being called.
Can someone please help?
Thanks
__________________
Rob Carter
|