• Adding a Dynamic URL to my Form (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Adding a Dynamic URL to my Form (2000)

    Author
    Topic
    #1770216

    Hi Folks

    I have a form which reads customer information from my database. The primary key for a customer is compID and we have individual pages on the web based on this compID – in other words, each of our customers has a unique webpage based on their compID.

    An example of a URL is http://www.ourwebsite.com/companypage.htm?compID=12345

    Is is possible to incorprate this URL on my form so that I can click it an go directly to a particular customer’s webpage? Obviously the url can’t be hard-coded on to the form as each address will be different for a customer.

    Any ideas how I can do this?

    Cheers,
    Kenny.

    Viewing 0 reply threads
    Author
    Replies
    • #1786342

      Hi,

      You have several ways to handle this. Do you plan to insert the URL into the table or just gather the URL when a use clicks a command button. If the latter, apply the code below and play with it to fit your need.

      Private Sub cmdURL_Click()
      Dim strURL as String
      strURL = “www.ourwebsite.com/companypage.htm?compID=” & Me.compID
      FollowHyperlink strURL
      End Sub

      HTH.

      Tim K.

    Viewing 0 reply threads
    Reply To: Adding a Dynamic URL to my Form (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: