Results 1 to 5 of 5
  1. #1
    Arnold is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2014
    Posts
    43

    Extracting information from a URL into an access data fields

    Hello


    I would like to know if its possible to extract information from a URL into an access data fields.


    By creating a Table for Competitors and storing the item url in each table so that the table looks like this
    CompetitorName , URL, Price, InStock
    I would need the price and Instock fields to be auto up dated for each item through its item url link.


    Is there a code that can accomplish this?

    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I store URL's as literal text in fields of data type Text

  3. #3
    Arnold is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2014
    Posts
    43
    Thank you for your reply.

    How about automated extraction of the price and instock status that are in the url link for each item is there a code or set of codes that are available to accomplish this?

  4. #4
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    I use:

    Code:
    sURL = "http://MYWEBSITE.COM"
    temp = ExecuteWebRequest(sURL)
    
    Function ExecuteWebRequest(ByVal url As String) As String
    Dim oXHTTP As Object
    If InStr(1, url, "?", 1) <> 0 Then
        url = url & "&cb=" & Timer() * 100
    Else
        url = url & "?cb=" & Timer() * 100
    End If
    Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
    oXHTTP.Open "GET", url, False
    oXHTTP.send
    ExecuteWebRequest = oXHTTP.responseText
    Set oXHTTP = Nothing
    End Function

  5. #5
    Arnold is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2014
    Posts
    43
    Thanks
    Can I share with you one item example url and the html elements and you could kindly direct me where these should be entered to achieve the desired results?

    http://www.walmart.com/ip/Hoover-2X-...32-oz/19232297
    <span class="bigPriceText1"> This is the dollar
    <span class="smallPriceText1"> This is the cents
    <span class="BodyLBoldGreen"> This is the InStock

    Also
    If you could just let me know into which of the three fields I should be entering the code info into
    URL, Price, InStock

    Thanks again for your speedy response

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

Similar Threads

  1. extracting data from access to excel
    By Newby in forum Access
    Replies: 9
    Last Post: 01-16-2013, 10:01 AM
  2. Replies: 1
    Last Post: 08-10-2012, 12:42 PM
  3. extracting data from field
    By focosi in forum Queries
    Replies: 6
    Last Post: 02-11-2012, 03:12 AM
  4. Replies: 8
    Last Post: 12-21-2011, 05:50 AM
  5. Replies: 3
    Last Post: 03-05-2011, 12:46 PM

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