I have two subroutines, each one references the type of form that the call is embedded in. However, one works and one doesn't.
This works:
This doesn't:
What am I missing?
Thanks,
~Kit
This works:
Code:
Public Sub doLockout(ByRef theForm As Form, ByVal isLocked As Boolean)
' In separate shared module
Dim ctl As Control
For Each ctl In theForm.Controls
Select Case ctl.ControlType
Case acTextBox, acComboBox
ctl.Enabled = Not isLocked
End Select
Next ctl
End Sub
Code:
Private Sub Lockout_Check_Click()
doLockout Me.Form, Me.Lockout_Check
End Sub
This doesn't:
Code:
Public Sub backToHub(ByRef theForm As Form)
DoCmd.Close acForm, theForm
DoCmd.OpenForm "TechSupportHub_Form"
End Sub
Code:
Private Sub Back_Button_Click()
backToHub Me.Form
End Sub
What am I missing?
Thanks,
~Kit
Last edited: