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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Internet Explorer from Access VBA

Status
Not open for further replies.

RECrerar

Technical User
Aug 18, 2008
2
GB
Hi,

I think this is possible but am not entirely sure. I have tried to keep this as short as possible , hope it isn't too long.

Background the the problem:
I am in the process of designing an Access database to keep track of our project information. As part of this we need to be able to generate weekly reports based on the hours booked to projects. The information on bookings is stored on a webpage on the company intranet. I want to be able to automatically pull this information into an access table each week.

Details or what needs to be achieved:
Step 1: Navigate to the web page.
Step 2: Values need to be entered into the web page to specify which data should be retrieved. This involved entering some values in text boxes, and changing which option buttons ("radios") are selected then clicking on a command button.
Step 3: A pop-up box appears asking if I want to open,save or cancel. This option should be selected automatically
Step 4: Import the information into an access table.

Where I am so far:
So currently I have an ActiveX web bowser control in a form in Access. When this opens I have some SendKeys commands that are used to entre the data. These currently work if you open the form from design view but not directly from the main database organising thing (the one that comes up when you start a project, I know thingy is not the best terminology but bear with me). This then brings up the pop-up box. So everything up till step 3 seems to be possible (I haven't yet tried making it ocurr at a certain time but will worry about that later) although it is very slow.

I then have two options, save or open and I'm not sure which is the best to go for. The data is in an Excel format (although there is another option to have it in a different format but not too sure what this is so have not really looked into it yet). I was opening it but I figure if I save it, I can save it in a know location with know name and then import it from there.

Where I need help:

Would it be better to connect directly to the internet rather than through a form in Access?

I believe that SendKeys is notoriously buggy and therefore it would probably be better not to use this if possible. I found the following thread and have tried this through Excel, I can get this to bring up the field names and enter the details in the text boxes but can not make it work for the radios, does anyone know why? Also how easy will it be to convert this code for use in Access?

How can I automatically select an option in a the pop-up box?

What would you suggest as the best means of extracting the data when I finally have it into an Access table (as a further point, I would probably want to overwrite all the data currently in the table although if this is harder than just adding data to the end then I don't have to).

Okay, I know this is very long and I hope it made sense. I have found quite a few threads round here that are helping but this is the first time that I've tried programming any interactions with the web so was still rather confused, hence starting my own thread.

Any help, even on anything would be appreciated and thanks for sticking it out to the end of this post. Robyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top