Results 1 to 8 of 8

Thread: MS Access WebBrowser.Document

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2021
    Posts
    1

    MS Access WebBrowser.Document

    Hi there--

    I am using MS Access 2016 and hoping to use the WebBrowser0.Document function. Currently, I am not given an option to use .Document, and I can't figure out why.

    Here is my VBA code:

    Private Function GetBrowserData1(ByVal FunctionName As String) As String
    GetBrowserData1 = WebBrowser0.Document.getElementById("Latitude").Value
    End Function

    When I run it, I get the error that says "Compile Error: Method or data member not found." and it highlights .Document.

    Please let me know how to fix this!
    Thank you for your help.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: MS Access WebBrowser.Document

    Office Development seems like it might get you more of the right eyes on the question, so I moved the thread there.
    My usual boring signature: Nothing

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: MS Access WebBrowser.Document

    WebBrowser0.Document
    what is webbrowser0? a webbrowser control? have you navigated to some website for it to contain a document?
    what is the parameter functionname? as it does not appear to be used
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4
    New Member
    Join Date
    Mar 2021
    Posts
    6

    Re: MS Access WebBrowser.Document

    Hi
    add watch window in Debugger for WebBrowser0...
    and see it is not nothing
    is has some propeerties...

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: MS Access WebBrowser.Document

    did you add some webbrowser control to a form in your project?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  6. #6
    New Member
    Join Date
    Mar 2021
    Posts
    6

    Re: MS Access WebBrowser.Document

    Hi, YES
    (DBASE, FOX PRO, MS ACCESS 2016, SYMBIAN C++)

  7. #7
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: MS Access WebBrowser.Document

    do you at some earlier point navigate to a website page?

    post more of your code, so maybe we can see where a problem might be
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  8. #8
    New Member
    Join Date
    Mar 2021
    Posts
    6

    Re: MS Access WebBrowser.Document


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width