Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a field in a hyperlink 1

Status
Not open for further replies.

Whooo

Technical User
Jul 18, 2002
11
US
On a form, the user inputs a symbol, i.e. HLT for Hilton.

I would like to use this field in a hyperlink to go out to a web site and do a lookup. I have created the command button to do the hyperlink but need to figure out how to add the symbol.

I need to add s={whatever the user enters in the field called symbol}

any suggestions? Cogito ergo sum - I think?
 
In the command button, make the Hyperlink Address "//" (without the quotation marks). This lets Access know that there is to be a hyperlink associated with this command button.

In the AfterUpdate event for the user input control add the following code:

Me.<commandbuttonname>.HyperlinkAddress = &quot;<main hyperlinkaddress up to the s=>&quot; & Me.[userinputcontrolname]

So, if your user input control is ctlSiteName, your command button is cmdButton and your hyperlink address is //www.mydomain.com/listsite?s= then the command above would look like:

Me.cmdButton.HyperlinkAddress = &quot;// & Me.ctlSiteName
. (Ignore the semi-colon after the quotation mark -- HTML is putting that in).
 
Thanks for your help, I will try it out in the morning Cogito ergo sum - I think?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top