T
tobesurveyor via AccessMonster.com
Good evening all,
I have the following function and sub but keep getting an error message.
Basically I have several subs all going to at one point call this public
function to get a value. I can not for the life of me figure out how to pass
the variable from the public function back into the sub. Here is the code:
Public Function HilightColor(strln As String)
ColorNameID = DLookup("[ChoiceMenuColorID]", "tblLocalSettings", "
[LocalSettingsID] = 1")
strln = DLookup("[HiliteColor]", "tblChoiceMenuColor", "
[ChoiceMenuColorID] = " & ColorNameID)
HilightColor = strln
End Function
Private Sub Launch01()
Me.bxLaunch01.BackStyle = 1
Me.bxLaunch01.BackColor = HilightColor
End Sub
Any help figuring out the error would be greatly appreciated. I know it's
simple but I am new to VBA coding using functions.
Thanks,
Chris
I have the following function and sub but keep getting an error message.
Basically I have several subs all going to at one point call this public
function to get a value. I can not for the life of me figure out how to pass
the variable from the public function back into the sub. Here is the code:
Public Function HilightColor(strln As String)
ColorNameID = DLookup("[ChoiceMenuColorID]", "tblLocalSettings", "
[LocalSettingsID] = 1")
strln = DLookup("[HiliteColor]", "tblChoiceMenuColor", "
[ChoiceMenuColorID] = " & ColorNameID)
HilightColor = strln
End Function
Private Sub Launch01()
Me.bxLaunch01.BackStyle = 1
Me.bxLaunch01.BackColor = HilightColor
End Sub
Any help figuring out the error would be greatly appreciated. I know it's
simple but I am new to VBA coding using functions.
Thanks,
Chris