R
richard.iserman
I have a form with a map of the US as a background and an image of a
star on each state. I want to change the visibility property of each
image when a transparent button is clicked that's over each state (I'll
need to do other things as well, but this is a start).
But it seems that I can't use a variable in the expression to change
this property, along the lines of:
'(Where strState is the name of the image)
Me.strState.Visible = True
I tried writing a simple wrapper based on a suggestion I saw elsewhere
in this forum:
Public Function state(strState As String)
state = strState
End Function
And using this instead:
Me.state(strState).Visible = True
It's clear that what I'm doing is wrong on some fundamental level, but
I wonder if there actually is some way to achieve this (short of
writing the expression out 50 times).
star on each state. I want to change the visibility property of each
image when a transparent button is clicked that's over each state (I'll
need to do other things as well, but this is a start).
But it seems that I can't use a variable in the expression to change
this property, along the lines of:
'(Where strState is the name of the image)
Me.strState.Visible = True
I tried writing a simple wrapper based on a suggestion I saw elsewhere
in this forum:
Public Function state(strState As String)
state = strState
End Function
And using this instead:
Me.state(strState).Visible = True
It's clear that what I'm doing is wrong on some fundamental level, but
I wonder if there actually is some way to achieve this (short of
writing the expression out 50 times).