Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    moss lovell is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6

    Searching for a specific string when using Webbrowser

    HI Guys



    Ive been building a data base and have included a form with a Webbrowser included. The web browser works fantastic to show a results from a jobsearch site the results show up in the page and as part of that page is a little line of text that says Jobs 1-25 of 268 i want to be able to find that number (268) and store in in a field to use later.

    I haven't a clue what to do.

    Please let it be a simple task.

    Cheers guys

    Moss

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    Have a look at the code behind my web version checker.
    https://www.access-programmers.co.uk...d.php?t=293970
    This reads the contents of a web page to a text file, extracts a selected section based on criteria that you decide and saves it to a specified table.

    The idea is almost identical to what you want and is extremely fast in use.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    moss lovell is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6
    Hi Colin

    i have clicked on that link but does not take me anywhere.

    Cheers

    Moss

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    It should take you to a page at Access World Forums. The link works for me

    Try copying & pasting the link below into your browser
    https://www.access-programmers.co.uk...d.php?t=293970
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    moss lovell is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6
    Hi again

    I have tried in in chrome and Internet explorer, Ive even found the site in google but cant get onto the site maybe error on the site.

    regards moss

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    Strange as the link was working earlier
    It seems that the whole Access World Forums site isn't available at the moment

    I've written the link in the attached text file for later use!
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Just tried and link worked.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    Still seems to be down when I tried.
    AWF has been unavailable most of today.
    In fact since just after I went there to check my link ...
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Tried again, link opens just fine. I can browse the site just as normal.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    Very odd. I also tried again. Site down

    This site can’t be reached

    www.access-programmers.co.uk’s server IP address could not be found.

    DNS_PROBE_FINISHED_NXDOMAIN
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    This is very weird. Just clicked on that link in post 10 and website opens. I found a thread there started today that complained:

    "My host didn't renew a domain related to this site and so this and all my other
    sites went down. Very disappointed with them. They have just renewed it so it is
    back up. But essentially, the host cocked up."

    Replies:

    "I am getting intermittent 'cannot find access-programmers.co.uk' error messages".

    "Probably a cached DNS lookup that failed earlier, somewhere in the Interwebs..."

    "Yes, takes a while for the DNS to catch up."
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    This is what I'm getting right now 4:23 EDT (and if I recall this has happened more than once in the past)

    Click image for larger version. 

Name:	uk.png 
Views:	17 
Size:	52.7 KB 
ID:	33202

    same thing with Chrome (just to be sure it wasn't Firefox based issue)

  14. #14
    moss lovell is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6

    Got on to the site

    Quote Originally Posted by ridders52 View Post
    Still seems to be down when I tried.
    AWF has been unavailable most of today.
    In fact since just after I went there to check my link ...
    Hi Again

    I finally got onto that site but im not understanding what I am looking at,

    I just need a head start of how to tell VBA that i want to access the contents of the webbrowser item, The site where the information is, https://jobsearch.direct.gov.uk/JobS...re=&q=&button= and i want to just the number of results.

    BTW nice pic of the Labrador I have 2 labs myself.

    Moss

  15. #15
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    I've stripped out everything you don't need from the attached database
    There is a sub called TESTDownload in the module modInternetDownload

    Run it and the number of jobs will be outputted to the VBE immediate window
    Currently its 14971 but obviously that will change frequently

    It works as follows:
    1. The contents of the web page are saved to a text file called 'webpage.txt' in the same folder as the database.
    If the file doesn't exist it will be created.
    If it does exist, it will be overwritten

    2. The routine looks for the string 'Jobs 1-25 of " & then reads the following 5 characters (14971) as a variable strText1

    3. Debug.Print is used to display the value in the immediate window

    To use in your own database
    1. Copy the 2 modules
    2. Save the value of strText1 wherever its needed in your database

    That's it! Good luck job hunting if that's what you're doing
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-22-2016, 11:16 AM
  2. Replies: 17
    Last Post: 08-09-2016, 07:15 AM
  3. Replies: 6
    Last Post: 07-27-2015, 10:23 AM
  4. Trying to find a value right of specific string with in text
    By weilerda in forum Import/Export Data
    Replies: 2
    Last Post: 10-18-2012, 12:58 PM
  5. get a specific data in a string
    By dada in forum Programming
    Replies: 2
    Last Post: 09-21-2010, 01:20 AM

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