1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access: Insert field data into hyperlink

Discussion in 'Business Applications' started by Mescalero, Aug 25, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. Mescalero

    Mescalero Thread Starter

    Joined:
    Jul 31, 2006
    Messages:
    45
    In my database I have what I call the main form. This form , among other things, contains a persons social security number [SSN]. I have placed a control button on this form that allows for me to jump to a hyperlink and perform a search of a second database through ASP. Now, everything is working fine but what I would like to do is be able to "plug in", via code, the [SSN] field data into the static portions of the hyperlink string. The SSN would have to be taken from the currently viewed record on the main form. The code for the button, as shown below, has a dummy SSN of 999-99-9999 (in orange) and this is the data that I need inserted from the [SSN] on the main form.
    _____________________

    Private Sub Command215_Click()
    FollowHyperlink "http://1.1.1.111/Prog/ProgWeb.aspx?Action=Search&Database=database name&SearchType=DocumentProfile&SearchValue=999-99-9999&ProfileFieldName=Document%20Title"

    End Sub
    ___________________________________________________
    As the code stands, it works as long as I manually place an SSN in there. Any suggestions that will allow me to take the SSN from the currently viewed record in the main form and place it between the two static portions of the hyperlink?

    Thanks in advance.
     
  2. Mescalero

    Mescalero Thread Starter

    Joined:
    Jul 31, 2006
    Messages:
    45
    Got it! This one was fairly simple. Even though I knew what I wanted to do and how I needed to make reference to it in the table I was just stumped by a stupid syntax problem. The f**king quote marks.

    This worked:

    .....e=DocumentProfile&SearchValue=" & [SSN] & "&ProfileFieldName=Documen......
     
  3. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    You got the Hyperlink to work then?
     
  4. Mescalero

    Mescalero Thread Starter

    Joined:
    Jul 31, 2006
    Messages:
    45
    Yeah man, I had everything right from the gate. It was really weird because, if you remember, if I pasted the link directly into IE address and hit enter it would take me where I wanted to go but that was not the case with followhyperlink. Once security in the other database and in all of the other places was set to recognize the user login and password from windows everything worked like a charm. Go figure!? So, yeah, everything works as desired now. Thanks again for your attention on the matter. I got another one for ya if you're game. hehehe. This one involves retreiving an image (or maybe not) based on certain criteria in the form. This is more of a workflow type effect. I will create a new thread for this one ahead of time since its not crucial......yet.(y)
     
  5. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    I am game?
     
  6. Mescalero

    Mescalero Thread Starter

    Joined:
    Jul 31, 2006
    Messages:
    45
    Cool, Check for a new thread in a bit.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/495502

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice