Yes, I know an object cannot be a constant. However, I need some way of having a "constant" form.
Here's my scenerio. I call a function from multiple controls and I pass the form and the control name.
The function is declared as follows:
I need to use other controls on the form within each case statement.
I do not want to type the form name each time I call the function.
Any suggestions?? Thanks in advance for your time.
Here's my scenerio. I call a function from multiple controls and I pass the form and the control name.
The function is declared as follows:
Code:
Function CtrlNavigation(frmName As Form, ctrlName As String)
On Error GoTo ERROR
Select Case ctrlName.NAME
Case "Control1"
.
.
Case "Control2"
.
.
Case "Control3"
.
.
Case "Control4"
.
.
Case Else
.
.
End Select
ERROR:
MsgBox Err.DESCRIPTION
End Function
I need to use other controls on the form within each case statement.
I do not want to type the form name each time I call the function.
Any suggestions?? Thanks in advance for your time.