Toggle Image.Visible if HyperLink Assigned

  • Thread starter Thread starter Mike Boozer
  • Start date Start date
M

Mike Boozer

Anyone know how I can toggle my image "Icon" to be visible or not depending
on whether a hyperlink has been added to a field. The field is formatted in
the table as a hyperlink. I tried IsNull etc to no avail. Correct code would
look something like this:

If ScanLinkField = Empty Then
Icon.Visible = False
ElseIf ScanField = Not Empty Then
Icon.Visible = True

But I am not sure on what event to put the correct code even if I had it.
Thanks.
 
You can try the OnCurrent event.
You may simply be able to do
If ScanLinkField = "" Then
Icon.Visible = false
else
Icon.Visible = true
end if

see if that does it for you.
 
Thanks Bryan. It works but it doesn't work. The problem with visible is that
it is a global event which does not allow individual record attributes as
far as I can tell. Once it becomes visible, it stays visible for all
subsequent records, even when being fired on the current event. I'll have to
try and figure out another way. Thanks.
 
Back
Top