Insert Hyperlink

  • Thread starter Thread starter Lucas
  • Start date Start date
L

Lucas

I know there must be an easy solution to this problem,
but it's escaping me.

I'm trying to insert a hyperlink into a form called
frmContactDirectory. frmContactDirectory displays basic
information pulled from tblContacts. When clicked, this
link would open frmContacts and display the record
corresponding to the entry in frmContactDirectory.

Thank you for your help.
 
Lucas said:
I know there must be an easy solution to this problem,
but it's escaping me.

I'm trying to insert a hyperlink into a form called
frmContactDirectory. frmContactDirectory displays basic
information pulled from tblContacts. When clicked, this
link would open frmContacts and display the record
corresponding to the entry in frmContactDirectory.

Thank you for your help.

You wouldn't normally use a hyperlink for this. Normally you'd use a
command button with code in its Click event procedure like this:

DoCmd.OpenForm "frmContacts", _
WhereCondition:="ContactID=" & Me.ContactID

where "ContactID" is the name of the primary key of your Contacts table.
The code assumes that ContactID is numeric, not text, and that this is
the name used on both forms.

If you want to get the "hand" pointer when you move the mouse over the
button, it's not built in but you can call the Windows API to set the
cursor; see http://www.mvps.org/access/api/api0044.htm .
 
Back
Top