Question about hyperlinks

D

Duane

What I am trying to do is, through the use of a form and the base url of the
company website concatenate the prisoners number [PNumber] field and the
base URL of the website.

The base URL is as follows -
http://www.state.mi.us/mdoc/asp/otis2profile.asp?mdocNumber=

The prisoner information is entered into the database via a text file and a
macro using the transfertext method. Unfortunately, the website link is not
available in the text file.

I have tried two different approaches and neither seem to work.

In my table I have the following fields, [PrisonerURL] & [PNumber]. One
scenario, I set the default value of the PrisonerURL field to the base URL
and using VBA I concatenated the PNumber to it. In the other scenario I
used the base URL in a text string and I didn't have a default value in the
PrisonerURL field.

Both scenarios showed the correct string in the field, but the neither one
worked when I clicked on the link. If I copy the URL and paste it into my
browser it works fine.

Any help would be greatly appreciated.

Thanks
 
B

BruceM

You could use a command button with the following code in its Click event
(strLink is the concatenated string that works when you paste it into your
browser):
Application.FollowHyperlink strLink
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top