Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Form Hyperlinks

Status
Not open for further replies.

jrtaylor

Technical User
Jan 24, 2002
34
US
I have an Access form where documents are hyperlinked but sometimes there is not a document for the reviewer to review. Is there a way to have a button or rectangle change color when a hyperlink has been added so the reviewer will know when a document is available?

If the button or rectangle were gray and when a document is hyperlinked it changes to blue. The reviewer would only click on the buttons that were blue.

I would appreciate any help.

jrtaylor [spineyes]
 
Why not just show the hyperlink in a field on the form? If the field is empty then obviously there is no document to link to. If you do want a box turning color try this:

Private Sub Form_Current()
Dim RED, BLUE
Dim MyObject

Set MyObject = Me!Box0
RED = RGB(255, 0, 0) ' Return the value for Red.
BLUE = RGB(0, 0, 255) ' Return the value for Blue.

If IsNull(HLink) Then
MyObject.BackColor = RED ' Set the Color property of MyObject to Red.
Else
MyObject.BackColor = BLUE ' Set the Color property of MyObject to Red.
End If

End Sub

Hope this helps

PaulBasel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top