database record-linked hyperlink

  • Thread starter Thread starter Werner
  • Start date Start date
W

Werner

My database contains thousands of records, each having a
patent number (e.g., 6,123,456).
I would like to add a link (hyperlink) to the Patent
Office for each record, so that the patent belonging to
that page is then displayed directly from the Patent
Office website.

Question: How can I make that hyperlink "soft" so that it
includes the patent number information. Such as, for
example, http://patft.uspto.gov/netacgi/nph-Parser?
Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=/netahtml/srchnum.htm&
r=1&f=G&l=50&s1=6,123,456.WKU.&OS=PN/6,123,456&RS=PN/6,123,
456. You see that patent number in the link!

Any suggestions?
 
Hi Werner,

Rather than using a hyperlink field, just put a button on your form and
use code something like this in its Click event procedure to build the
URL/query and activate it:

NB: this is untested air code. It assumes that the patent number is
displayed in a control called txtPatNum.

Const USPTO_1 = "http://patft.uspto.gov/blahblahblah&s1="
Const USPTO_2 = ".WKU.&OS=PN/"
Const USPTO_3 = "&RS=PN/"
Dim strPatURL As String

With Me.txtPatNum
strPatURL = USPTO_1 & .Value & USPTO_2 & .Value _
& USPTO_3 & .Value
End With
FollowHyperlink Address:=strPatURL, _
NewWindow:=True

Note that the Patent Office may revise its search syntax any time.
That's why I put the pieces of the URL into constants rather than hiding
them in the code. For a production quality database it would be better
to store both the constant parts of the URL and the way they need to be
joined up with the patent number as user-accessible options settings
rather than as part of the VBA project.

The patent office may also have an alternative, simpler search syntax
intended for just this purpose, needing the patent number entered only
once. Judging by your email address you'll have a better idea how to
find out about this than I do<g>



My database contains thousands of records, each having a
patent number (e.g., 6,123,456).
I would like to add a link (hyperlink) to the Patent
Office for each record, so that the patent belonging to
that page is then displayed directly from the Patent
Office website.

Question: How can I make that hyperlink "soft" so that it
includes the patent number information. Such as, for
example, http://patft.uspto.gov/netacgi/nph-Parser?
Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=/netahtml/srchnum.htm&
r=1&f=G&l=50&s1=6,123,456.WKU.&OS=PN/6,123,456&RS=PN/6,123,
456. You see that patent number in the link!

Any suggestions?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Back
Top