Call up a web page based upon field content

  • Thread starter Thread starter Lurch
  • Start date Start date
L

Lurch

Hi Folks!

I have an access database (2000). In this database, I have a continous
form that contains a field called "txtID". How would I code a button
placed on this continous form so that when I click it, it will open
Internet Explorer and bring up a web page (intranet site) based upon
the corresponding 'txtID' value?

I hope that this made sense. Thanks in advance for your help.

Lurch
 
Lurch said:
Hi Folks!

I have an access database (2000). In this database, I have a continous
form that contains a field called "txtID". How would I code a button
placed on this continous form so that when I click it, it will open
Internet Explorer and bring up a web page (intranet site) based upon
the corresponding 'txtID' value?

I hope that this made sense. Thanks in advance for your help.

How does the URL of the page to be loaded depend on the txtID value? It
could be something like this:

'----- start of example code -----
Private Sub txtID_Click()

Const conBaseURL As String = "YourBaseIntranetURL/"

If Not IsNull(Me.txtID) Then

Application.FollowHyperlink _
"http://" & conBaseURL & Me.txtID

End If

End Sub
'----- end of example code -----

But the details will depend on where txtID fits into the URL to be
followed.
 
You could make the txtID field a hyperlink field in your underlying table if
yuo only use it for this link. Then there is no coding necessary other then
entering the link in the field
 
Back
Top