Form to access website and type in search bar

andyrew30

Registered User.
Local time
Today, 15:57
Joined
Feb 3, 2014
Messages
16
Hi guys,

I'm not sure if this is possible, hopefully someone can let me know. Essentially what I am trying to do is get a button on my form to open two reports, and also go to a website. Once at the website I want it to type in a search bar based off of the criteria of the two reports. I currently have it able to open both reports correctly, and I can get the website to open, but I am not able to find a way to get access to type anything once on the website.

I am opening the website using:

Application.FollowHyperlink _
"enterwebsite"

Thanks!
 
I'll assume you handle some IF...THEN...ELSE in VBA.

Therefore, ensure your reference to Microsoft Internet Controls is checked from the Tools -> Reference menu (in module view).

Then you can use the code below as a jumping off point.

Code:
    Dim objIE As InternetExplorer
    Set objIE = New InternetExplorer
   
    objIE.Visible = True
    
    objIE.Navigate "http://www.access-programmers.co.uk/forums/"
    
    Set objIE = Nothing
 
Thanks for the quick reply Mile-O!! That helped a ton. The next part is a little more advanced and I am not quite sure how to do it. I now know how to enter the data into the search box using: ie.Document.getElementById("file_id").Value = "1457899"

But the problem I am facing is that the search box isn't automatically hilighted upon entering the page. So my question is; how do you click on a search box to make it active in order to type into the box?

Thanks
 
You have checked that you cannot pass the search terms in the URL?
 
It's an intranet site at work that searches from a database. So the url never changes.
 

Users who are viewing this thread

Back
Top Bottom