mike60smart
Registered User.
- Local time
- Today, 10:37
- Joined
- Aug 6, 2017
- Messages
- 1,914
Hi Everyone
I had the following in an OnClick Event for a Subform
I then attempted to add a requirement for a Password with the following Code.
This now gives me the error shown below.
Any help in pointing out where I am wrong appreciated.
I had the following in an OnClick Event for a Subform
Code:
Private Sub cmdMask_Click()
10 On Error GoTo cmdMask_Click_Error
Dim x
20 x = InputBoxDK("Password Required", "Password Required")
30 If x = "" Then End
40 If x = "SCtb0825" Then
50 DoCmd.OpenForm "Administration", acNormal
60 MsgBox "Welcome " & Environ("UserName") & "!", vbExclamation
70 End
80 End If
90 On Error GoTo 0
100 Exit Sub
cmdMask_Click_Error:
110 MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure cmdMask_Click, line " & Erl & "."
End Sub
I then attempted to add a requirement for a Password with the following Code.
This now gives me the error shown below.
Any help in pointing out where I am wrong appreciated.
Code:
Private Sub cmdDisable_Click()
Dim x
10 x = InputBoxDK("Password Required", "Password Required")
20 If x = "" Then End
30 If x = "SCtb0825" Then
Dim ctrl As Control
40 For Each ctrl In Detail.Controls
50 If (TypeOf ctrl Is TextBox Or TypeOf ctrl Is ComboBox) Then
60 ctrl.Enabled = False
70 End
80 End If
90 Next
End Sub