By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Calling IE from Access with a Google search string...

P: 27
Hi all;
I have an interesting challenge for you all... I have a Contact Details form in my DB that contains all the usual stuff. But inevitably sometimes all the information we have for a client is their first name and last name and often the URL of their host institution. So I thought I'd do a bit of automation. I've placed a command button labelled Find Me! on the Contact Details and this calls Internet Explorer. (is there a more elegant way of doing this than "C:\program files\internet explorer\iexplore.exe"?)

Anyway, as some of you may know you can hop straight to a URL by using "iexplore.exe www.msn.com" or suchlike. I want to insert a URL after "iexplore.exe" that reads:

http://www.google.co.uk/search?hl=en&as_qdr=all&q=
+%22[FIRSTNAME]+[LATNAME]%22+site
%3A[INSTITUTIONURL]&btnG=Search&meta=

This is equivalent to typing

"John Smith" site:www.msn.com

into Google, and will only return the exact phrase John Smith within www.msn.com and all its sub-pages. [FIRSTNAME], [LASTMANE] and [INSTITUTIONURL] are all fields that'll be visible on forms when the user clicks "Find Me!", so they don't need to be rooted out first.

So here's the question: Does anyone know how to use the code builder to find these three variables, plug them into the URL and launch Explorer? It would also be good if there was a way to return an error message and stop the code if [INSTITUTIONURL] = ZLS or NULL.

Thanks!
Jun 14 '07 #1
Share this Question
Share on Google+
2 Replies


P: 27
Well, I tried to use RunApp in a macro using:

c:\program files\internet explorer\iexplore.exe http://www.google.co.uk/search?hl=en&as_qdr=all&q=
+%22[frmContactDetails!firstname]+[frmContactDetails!lastname]
%22+site%3A[frmInstDetails!UniURL]&btnG=Search&meta=

didn't work obviously but one lives in hope...
Jun 14 '07 #2

NeoPa
Expert Mod 15k+
P: 31,186
In VBA code you can use the Shell() function.
I'm afraid you'll need to find the syntax of the invocation elsewhere (I suggest the Windows Forum)
Jul 4 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.