Results 1 to 4 of 4
  1. #1
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191

    Retrieving external Data


    Hi Guy's first and foremost, hope everyone is staying safe

    A bit of a long shot of a question, is it possible in Access vba to retrieve data based on and excel row but the excel file is shared on One Drive

    We shouldn't need to check for null values as the data searched will be on the excel file

    ie: StrPath = "onedrive.live.com/ etc etc"

    Access data query 123456

    Returns MsgBox(123456 is Found In Cell B373)

    If MsgBox("Do You Want To Retrieve Cell H373" ?

    MsgBox("Cell H373" = "Hello")


    Please note, i have ignored correct quotes etc, i am only typing to hopefully make sense of the question

    Possibly even retrieve the Excel page name that this found

    MsgBox("Result Found On Page Name:" & _
    PageName & " " & "Cell H373: " & Hello)
    Thank you guys

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,420
    to clarify - you want access to search all worksheets of a specified excel workbook for a specific value and you only want the first instance of that value to be returned? and that value is the 'whole value' i.e. if searching for 'hello' you would not want 'hello world' returned.

    If the question is about searching a file on one drive, I don't see that would be a problem - try it and see

  3. #3
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191
    Hi Ajax, thank you for your reply, would you have a sample code obviously apart from one drive address and our search input ?

    The search would be the full content of the cell so in my example hello would be the only word in H373, my search would be of Column B, so if i search 123456 and it's found on Page Mar-Apr 2020 in cell B373, i am wanting to return what H373 says ie:

    123456 found in cell B373 Worksheet Name Mar-Apr 2020
    hello found in cell H373 Worksheet Name Mar-Apr 2020

    13579 found in Cell B104
    goodbye found in H104

    So its the same row as the access query but a different column for the result return

    Hope all of this makes sense

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,420
    I don't have any code as such but found this link you could adapt

    https://www.access-programmers.co.uk...number.201025/

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

Similar Threads

  1. Retrieving data from linked database
    By dwilkerson43 in forum Access
    Replies: 6
    Last Post: 10-24-2018, 09:39 AM
  2. Replies: 7
    Last Post: 05-17-2016, 06:04 PM
  3. Inserting data and retrieving fields
    By sovereign in forum Access
    Replies: 10
    Last Post: 08-26-2015, 02:34 PM
  4. Web retrieving of Data
    By drunkenneo in forum Programming
    Replies: 1
    Last Post: 05-23-2014, 01:38 AM
  5. Retrieving data on my website
    By kattys in forum Access
    Replies: 1
    Last Post: 04-27-2010, 05:02 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