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!

Can I query data from external GUI (webbased)?

Status
Not open for further replies.

AC5FF

Technical User
Jul 25, 2007
35
US
When running a query and/or form from MS Access is there a way to take data from that query; i.e. a part number, and then using a web-based search page find information on that webpage and import it back into the form I am looking at in Access?
I've tried using macros and haven't been successful. Any other hints/tricks anyone else might have would be great to hear!

Thanks!
 
Macros aren't powerful enough for what you need to do, but it can be done with VBA.

If the web based search engine can accept a query as a parameter, then you can pass it across as a parameter.

For example:

Code:
Application.FollowHyperlink "[URL unfurl="true"]http://www.google.co.uk/search?hl=en&q=tek-tips&meta="[/URL]

You need to pass across the component between &q= and &meta= to produce the results for your query.
With regards to using some of the results in Access, you will need to parse the resulting data and retrieve the data you expect to see in the web page.
By using a Web Browser ActiveX control, rather than using VBA, you can more easily access the HTML streams though than by using FollowHyperlink.

Remember to put strong error handling in though to counter for page design changes.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top