M
MikeC
Can anyone tell me a way to reference a variable using
another variable?
I've written a function that I would like to use to update
a public variable passed to it by the calling procedure.
I've tried using the Eval() function, but I receive the
below error.
"Database can't find the name 'MyVariable' you entered in
the expression."
A snippet of the code is below (strVariable="MyVariable"):
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Private Function fnHyperLinkOnCurrent(ctlTxtBox As
Control, ctlHyperLink As Control, strVariable As String)
If Not IsNull(ctlTxtBox) Then
ctlHyperLink.Caption = ctlTxtBox.Value
ctlHyperLink.HyperlinkAddress = fnPath() & "\" &
ctlTxtBox.Value
Eval(strVariable) = ctlTxtBox.Value
Else
ctlHyperLink.Caption = ""
ctlHyperLink.HyperlinkAddress = ""
Eval(strVariable) = ""
End If
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Any useful ideas would be greatly apprecicated. Thanks.
another variable?
I've written a function that I would like to use to update
a public variable passed to it by the calling procedure.
I've tried using the Eval() function, but I receive the
below error.
"Database can't find the name 'MyVariable' you entered in
the expression."
A snippet of the code is below (strVariable="MyVariable"):
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Private Function fnHyperLinkOnCurrent(ctlTxtBox As
Control, ctlHyperLink As Control, strVariable As String)
If Not IsNull(ctlTxtBox) Then
ctlHyperLink.Caption = ctlTxtBox.Value
ctlHyperLink.HyperlinkAddress = fnPath() & "\" &
ctlTxtBox.Value
Eval(strVariable) = ctlTxtBox.Value
Else
ctlHyperLink.Caption = ""
ctlHyperLink.HyperlinkAddress = ""
Eval(strVariable) = ""
End If
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Any useful ideas would be greatly apprecicated. Thanks.