Set the picture property in an image control from a hyperlink

B

Bruce

How can I set, update or assign a hyperlink in my forms record source to the
picture property of an image control.

To elaborate;

1) I have a table with hyperlinks to all my images.

2) I have my form in single view with an image control but I cant seem to
assign my [hyperlink] directly as it does not have a record source.

This is one way I have done it so far by calling from the on current event...

Basically it returns my [hyperlink to a text box. Removes the # from the
link and sets the control property.

Is there a more efficient way to do what I am doing? This seems a bit
cumbersome.

Bruce

Sub myImages()
Dim a As String
With [Forms]![frm_Product_Library]
a = Nz(![HyperImage], "")

If a = "" Then
Else
c = Mid(a, 2, Len(a) - 2)
End If
.Controls("myImgCtrl").Picture = c
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top