Access VBA: Click link for webbrowser naviation

I can't seem to get the syntax to work to InvokeMember click a link on a web page within the ActiveX WebBrowser object.

The WebBrowser is linking to a page that lists a series of records.  My program searches the body of the page, performs some actions, and then I want it to click the "Next" link at the bottom and start over again on the next page.  The title of the link is "Next Page".

Can you please provide syntax, including any necessary references, to click the "Next Page" link?

Thanks.
Phish_HeadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
rajaamirapuCommented:
Get the document from webbrower. Include html library and iterate throgh all the links. In the links you will get your link. Navigate to that link by calling the Browser.navigate
Hope this helps
0
 
Phish_HeadAuthor Commented:
I'm unable to find full syntax to loop through the available links.  Can you please provide the code?
0
 
rockiroadsCommented:
Another way possibly is to embed the datasheet view of a query in a form (datasheet view of a form essentially with the form's recordsource being the query). The form has properties like allowedits etc.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
rockiroadsCommented:
My bad, wrong thread! doh!
0
 
rockiroadsCommented:
Ok, now I am on your thread.

From my understanding you have a webbrowser control
This has many links to it but the one you are interested in is titled Next Page
You want to find this and navigate to whatever that is?

Right assuming you had a control called webie. We get the list of links, find Next Page and navigate to that url



Dim htmldoc As HTMLDocument
    Dim htmllinks As HTMLAnchorElement
    
    Set htmldoc = webIE.Document
    For Each htmllinks In htmldoc.Links
        If htmllinks.innerText = "Next Page" Then
            webIE.Navigate2 htmllinks.href
            Exit For
        End If
    Next

Open in new window

0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
rajaamirapuCommented:
Here webIE is the webbrowser control
0
 
Phish_HeadAuthor Commented:
I meant to allocate the points to rockiroads
0
 
rockiroadsCommented:
I did wonder about the accepted solution until I saw your last post. You can post a question in community support to get this corrected. For PAQness sake it would be good to show the accepted solution.
0
 
rockiroadsCommented:
sorry, forgot to give you the link read this when things go wrong http://www.experts-exchange.com/help.jsp#hs=29&hi=409
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.