search the internet

iankerry

Registered User.
Local time
Today, 17:16
Joined
Aug 10, 2005
Messages
190
Hi

I would like to be able to type the name of a film into my films database, push a button that will then go and search a website (e.g. play.com) for that film name and bring it up in a browser.

Is this possible in access?

Thanks for any tips!

Ian
 
Yes, you can use Application.FollowHyperlink.

Code:
Application.FollowHyperlink "http:\\www.play.com....." & [YourSearchString]

JR
 
I would like to be able to type the name of a film into my films database, push a button that will then go and search a website (e.g. play.com) for that film name and bring it up in a browser.

Is this possible in access?

Thanks for any tips!

Ian
I assume what you mean is that you want to use the search engine of play.com.

In other words - manually you would take your film name, open IE/Firefox, navigate to www.play.com, enter the film name and press search.

The answer is yes this is possible in theory. Meaning it depends on what kind of internet site you are trying to use, if they have HTML or flash etc.

I would suggest you have a look at this FAQ

http://www.access-programmers.co.uk/forums/showthread.php?t=176968

This is going to give you the basics.

Your steps are going to be something like this
1. In an access form have the film name
2. Click a button which closes this form and opens a new form
3. The new form has a WebBrowser Control embedded on it
4. Pass as a variable between the two forms the film name
5. Wait for the web page to load.
6. Find the dropdown box element and change it to DVD or DVD title
7. Find the search field and enter your film
8. Find the search button and click the search button.

All this can be done automatically showing you the result of the search.

The way you see the HTML of a web page in Firefox for example is to open the webpage then right click and view source. You can than use the Edit>Search features.

There is one massive long line there which has a form in it and that is your search form where you have the dropdown box (option box) and the blank field and the button to click.

Code:
</script> 
<div class="sc">    
<div class="sback_r">    
<div class="searchbox">
<form class="nomargin" name="search" method="get" action="/Search.aspx">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="region_td">
<div class="region">
<select name="searchtype" class="searchtype">
<option selected value="allproducts">All Products</option><option  value="-----------------------">-----------------------</option><option  value="r2alldvd">DVD</option><option  value="musicall">Music</option><option  value="gameall">Games</option><option  value="bookall">Books</option><option  value="abcdall">Audiobooks</option><option  value="CAL">Calendars</option><option  value="ELEC">Electronics</option><option  value="PCSH">Computing</option><option  value="TOYS">Toys</option><option  value="GADG">Gadgets</option><option  value="MBLS">Mobile Phones</option><option  value="mobileall">Mobile Content</option><option  value="clothingall">Clothing</option><option  value="TICKETS_ALL">Tickets</option><option  value="-----------------------">-----------------------</option><option  value="r2alldvd">DVD</option><option  value="R2">  – DVD</option><option  value="r2title">  – DVD Title</option><option  value="r2actor">  – DVD Actor</option><option  value="r2director">  – DVD Director</option><option  value="r2language">  – DVD Language</option><option  value="r2subtitles">  – DVD Subtitle</option><option  value="BLU">  – Blu-ray</option><option  value="HD">  – HD DVD</option><option  value="-----------------------">-----------------------</option><option  value="musicall">Music</option><option  value="cdall">  – CD</option><option  value="downloadall">  – Downloads</option><option  value="rmtitle">  – Music DVD</option><option  value="musicartist">  – Artist</option><option  value="-----------------------">-----------------------</option><option  value="gameall">Games</option><option  value="PC">  – PC</option><option  value="PS2">  – PS2</option><option  value="PS3">  – PS3</option><option  value="PSP">  – PSP</option><option  value="XBOX">  – Xbox</option><option  value="X360">  – Xbox 360</option><option  value="DS">  – DS</option><option  value="GBA">  – GBA</option><option  value="GC">  – GameCube</option><option  value="WII">  – Wii</option><option  value="-----------------------">-----------------------</option><option  value="bookall">Books</option><option  value="booktitle">  – Title</option><option  value="bookauthor">  – Author</option><option  value="bookisbn">  – ISBN</option><option  value="-----------------------">-----------------------</option><option  value="abcdall">Audiobooks</option><option  value="abcdtitle">  – Title</option><option  value="abcdauthor">  – Author</option></select></div></td><td class="data_td">
 </div></div></div><td class="head_r"><div class="sbasket"><h3><a href="[URL="http://www.access-programmers.co.uk/forums/view-source:http://www.play.com/HOME/HOME/6-/ShoppingBasket.html"]/HOME/HOME/6-/ShoppingBasket.html[/URL]">My Shopping Basket</a></h3><div class="text_empty">       <p>Your basket is empty</p>    </div>    </div></td></tr>    </table></div>
 
Thanks Both, you led me int he right direction. The tricky bit was getting the correct string for the search bit of the website.

here is my code which works well


Dim play
Dim searchterm

play = "http://www.amazon.co.uk/s/ref=nb_ss?url=search-alias%3Daps&field-keywords="

searchterm = play & filmname.Value

Application.FollowHyperlink searchterm


there is probably a neater way of doing it - but it WORKS!!!!!

great thanks very much
 

Users who are viewing this thread

Back
Top Bottom