RE: Hyperlink to a specific record in another form



Brian-
Thanks. What you are describing seems to be what I want to do, but it went
completely over my head. Could you tell me, or refer me to somewhere I can
figure out how to do this step by step? I just taught myself the basics of
access over the past few weeks, so virtually all of the writing codes stuff
is way over my head.
Thanks so much.
--
Amie


"Klatuu" wrote:

Bookmarks are not presisent and in any case, would not transfer from one form
to another.
Hyperlinks do not apply in this situation. Hyperlinks take you to a
specific document or file, not to a record in a table.
The most common way to open a form to a specific record from another form is
to use either the Where argument or the OpenArgs argument of the OpenForm
method. My preference is the OpenArgs argument.
Assume FormA opens FormB and you want FormB to open to a customer selected
in FormA.
In FormA:

Docmd.OpenForm "FormB", , , , , , Me.txtCustID

In the Load Event of FormB:

If Not IsNull(Me.OpenArgs) Then
With Me.RecordsetClone
.FindFirst "[CustID] = " & Me.OpenArgs
If .NoMatch Then
Msg Box "Customer " & Me. OpenArgs & " Not Found"
Else
Me.Bookmark = .BookMark
End If
End With
End If
--
Dave Hargis, Microsoft Access MVP


"Brian" wrote:

Not sure how this would apply to a hyperlink, but you can use the Bookmark
property to identify & bring up a particular record.

Me.RecordsetClone.FindFirst "[CustomerID] = " & <CustomerIDOfDesiredRecord>
Me.Bookmark = Me.RecordsetClone.Bookmark

I use this to navigate to a specific record selected in a combo box on the
form itself, thus the "Me" refers to the same form. It finds the first record
matching the desired CustomerID (FindFirst), then goes to that record
(Me.Bookmark = ...).

You would just have to pass the desired value from your hyperlink to the
form that is to be opened (perhaps as a public variable) and put the above
code in the form's open event.

Optionally, you could filter the form as it is opened to just the record you
want by referring to the value of the hyperlink in the criteria line of the
form's RecordSource query.

"amie" wrote:

I am trying to create a hyperlink that will open up a specific record in
another form instead of always opening to the first record. Does anyone know
how to do that? Thanks
--
Amie
.



Relevant Pages

  • RE: Outlook 2007 wont open hyperlinks...
    ... My problems are similar but worse -- when the hyperlinks stop to ... install/uninstall google desktop, back to using just Macafee, ... browse for the document from within and it opens properly. ... If I install Firefox, make it the default, then uninstall it, that will ...
    (microsoft.public.outlook)
  • RE: Outlook 2007 wont open hyperlinks...
    ... My problems are similar but worse -- when the hyperlinks stop to ... install/uninstall google desktop, back to using just Macafee, ... browse for the document from within and it opens properly. ... If I install Firefox, make it the default, then uninstall it, that will ...
    (microsoft.public.outlook)
  • Re: CAT-5 buried, exposed to sun
    ... But to charge EACH head, you would need an array on EACH head. ... And what opens the valve when the 802.11G says "open, open, open"? ... The battery that was kept charged by the roving bot. ...
    (sci.electronics.design)
  • Re: How do I change the default hyperlink viewer to pic. & fax vie
    ... created hyperlinks in the presentation. ... Vista on my laptop it uses Internet Explorer to open up the image links. ... know that Vista does not contain the Picture & Fax Viewer anymore, ... Exit out of Internet Explorer each time it opens an image up in it or if you ...
    (microsoft.public.powerpoint)
  • RE: Launch Lotus Notes databases from a link within Sharepoint 2003
    ... Many people know Notes can launch Internet Explorer, ... you can add hyperlinks (A ... Clicking the hyperlink opens the database mydb.nsf on the ... >the way I have done it is to create a new .htm page with ...
    (microsoft.public.sharepoint.portalserver)

Loading