Question - Adding Hyperlink command button with dynamic output

SiblingRivalry

New member
Local time
Yesterday, 23:49
Joined
Dec 4, 2006
Messages
4
Trying to add a field in my access database that will allow me to enter a search term in an unbound text form and click one of three command buttons (Google.com, Dictionary.com, Thesaurus.com) to launch the browser with a dynamically created web address.

Basically I would need the command button to have a base address such as:
http://www.google.com/search?hl=en&q=[Looks to text field for this value]

Anyone have any ideas on how I might accomplish this? I am creating a database of stories and would like to add this feature so I can quickly access these common writer's utilities while entering new stories in the database.

Thanks!
 
Figured it out

Got it figured out.

The command button is Command49 and the unbound text box is Search.
-----------------------------------
Private Sub Command49_Click()
Dim keyword As String
keyword = Me!Search
Application.FollowHyperlink _
Address:="http://www.google.com/search", _
ExtraInfo:="q=" & keyword, _
Method:=msoMethodGet


End Sub
------------------------------------
 

Users who are viewing this thread

Back
Top Bottom