Results 1 to 14 of 14
  1. #1
    edanMimran is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    7

    Microsoft Access 2013 Web Control question

    i'm looking for a code that can solve me an issue with something that i write.



    i'm using a web control to display a page.
    i want to have a code that can copy to a field in that same form, the html source of that page that is displayed in the web control.


    any ideas how i can do that?

    thanks ahead of time

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    edanMimran is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    7
    Quote Originally Posted by orange View Post
    What have you tried so far?
    Basically i haven't done nothing yet.
    i'm looking for any code that will allow me to copy the page source code into a field in the form so i can process the source code via access.

    i know its possible, but i just never done it.

    thanks,

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by edanMimran View Post
    Basically i haven't done nothing yet.
    i'm looking for any code that will allow me to copy the page source code into a field in the form so i can process the source code via access.

    i know its possible, but i just never done it.

    thanks,
    Code:
    Dim strAddress As String
    Dim appInternet As InternetExplorer
    Dim HTMLdoc As HTMLDocument
    Dim intCount As Integer
    Dim varOuter As Variant
    strAddress = "http://google.com/"
    Set appInternet = CreateObject("InternetExplorer.Application")
    
        With appInternet
        
          .Navigate strAddress
          .Visible = True
          While .Busy Or .ReadyState <> 4 Or .Busy = True: Wend
          Set HTMLdoc = .Document
        
        End With
    
    For intCount = 0 To HTMLdoc.all.tags("HTML").length - 1
        varOuter = HTMLdoc.all.tags("HTML").Item(intCount).outerHTML
        Debug.Print varOuter
    Next intCount

  5. #5
    edanMimran is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    7
    thank you so much!
    it works like a charm......

    i really appreciate that

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    No problem. I wasn't sure how it could be done. I almost gave up trying. Now I think I will try to automate logins to our vendor sites and get info that they did not want to offer via an API.

  7. #7
    edanMimran is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    7
    sound interesting.....
    i would love to see that.

    i want to write something that can automate social media sites.....

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Seems like a big hurdle is making sure the web page is done loading. I downloaded this DB and it seems to work. It goes after an open window. I added a simple Boolean in the if then statement. This way I can verify a window is open before proceeding.
    https://www.accessforums.net/code-re...ite-33822.html

    in the sample, there is some code to insert text in a field on a webpage. You need to get the field/control names correct in order for it to work. I found this link very useful for deciphering the source html.
    http://www.access-programmers.co.uk/...d.php?t=176968

  9. #9
    edanMimran is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    7
    this is great... i like it

    they both works fine....
    what do you write in access? is this your work? or hobby?

  10. #10
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Right now I am busy upgrading some mdb files to accdb. I am post whoring here so I can brush up on Access. When I go live with the upgrades, I want to make sure I can fix anything quickly that might do wrong.

  11. #11
    edanMimran is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    7
    to be busy is always good!!!!
    if you interesting, i have some potential work for one of my client that i cant do it alone because im too busy as well.
    if you interesting, drop me a line here, maybe we can do something as well.

    all the best and again, thank you so much!!!!!! i appreciate that a lot.

  12. #12
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Edan,

    Could you post a copy of your database (confidential stuff removed) showing the technique saved in ACC2010 format? You could zip it also.
    Thanks.

  13. #13
    edanMimran is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    7
    what database?


    Quote Originally Posted by orange View Post
    Edan,

    Could you post a copy of your database (confidential stuff removed) showing the technique saved in ACC2010 format? You could zip it also.
    Thanks.

  14. #14
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    You posted related to a web form to go to web site and copy data. ItsMe offered some code and references. You said you got it to work.
    this is great... i like it

    they both works fine....
    As you saw previously, there are not a lot of working samples of interacting with web pages.
    I was asking that you share what you got working with others on the forum in the form of a demo database.
    THanks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 10-14-2013, 12:11 PM
  2. SQL Query challenge in Microsoft Access 2013
    By Bingfoot in forum Queries
    Replies: 5
    Last Post: 10-07-2013, 07:58 AM
  3. Microsoft Access Runtime Question
    By kgbo in forum Access
    Replies: 2
    Last Post: 08-30-2013, 02:35 AM
  4. Access 2013 Web App with Sharepoint 2013
    By miguel.escobar in forum Access
    Replies: 7
    Last Post: 06-17-2013, 09:03 AM
  5. Replies: 1
    Last Post: 05-22-2013, 02:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums