G
Guest
How do I need to change this to eliminate the complie error message?
varName = If Me.ActiveControl.Name = "TruckID" Then
Thanks!
varName = If Me.ActiveControl.Name = "TruckID" Then
Thanks!
Loni - RWT said:How do I need to change this to eliminate the complie error message?
varName = If Me.ActiveControl.Name = "TruckID" Then
Thanks!
What I need to do is call different forms based on the name of the active
control. This same code would work for multiple controls if I can establish
this variable and then call the appropriate form for that control.
Thanks again!
SteveM said:Try this:
Select Case Me.ActiveControl.Name
Case "SomeName"
'[Call your form here]
Case "SomeOtherName"
'[Call your form here]
Case Else
'[Call default form here if no match found]
End Select
You can have as many 'Case "??"' lines as there are control names to test
for...
Steve
Loni - RWT said:What I need to do is call different forms based on the name of the active
control. This same code would work for multiple controls if I can establish
this variable and then call the appropriate form for that control.
Thanks again!