+ Reply to Thread
Results 1 to 6 of 6

trying to read data from an access database

  1. #1
    Registered User
    Join Date
    06-24-2015
    Location
    Vermont
    MS-Off Ver
    2010
    Posts
    50

    trying to read data from an access database

    ive never really worked with access but what I am trying to do is have a macro that looks in the access file and the table is called "updates" and within that table I want it to look in the column called "station" and in the column called "date" and the column called "updates" to see if there is a match within a row.


    so in my excel file range A2 has the station number so when the macro runs it looks at the value of cell A2 in the excel file and then trys to see if there is a match in the access file with todays date from "date" column and and the word UPDATED from the "update" column are in the same row together..

    I know this probably sounds confusing... any questions just ask...

    the excel path = C:\Users\user\Desktop\updates.xlsm
    access path = C:\Users\user\Desktop\access updates.accdb
    Last edited by justlearning123; 06-24-2015 at 08:29 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: trying to read data from an access database

    This has slipped way down the list now, I will ask the access experts for help for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-24-2015
    Location
    Vermont
    MS-Off Ver
    2010
    Posts
    50

    Re: trying to read data from an access database

    thank you!! I appreciate it!

  4. #4
    Registered User
    Join Date
    06-24-2015
    Location
    Vermont
    MS-Off Ver
    2010
    Posts
    50

    Re: trying to read data from an access database

    it they are in the same row then the code should exit sub.. if there is no match then the msgbox should say "needs to be updated" thank you I should have put this in the first post

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: trying to read data from an access database

    What do you want to happen if a match is found?

    Is this only for one row or multiple rows?
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    06-24-2015
    Location
    Vermont
    MS-Off Ver
    2010
    Posts
    50

    Re: trying to read data from an access database

    if the match is found it should do nothing I will want to code it to run a macro if it is not found but for now a msgbox will be fine and it should look in all the rows but the match whould be within the same row thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. copy data from one access database to another access database
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2014, 09:03 AM
  2. [SOLVED] read from access database with excel
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2014, 02:12 AM
  3. VBA Module running DELETE and UPDATE in Access via SQL causing DATABASE to be READ ONLY
    By jamesdeuce in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-18-2013, 02:08 PM
  4. Replies: 2
    Last Post: 07-05-2013, 09:37 AM
  5. Read MS Access Database to Get Last Record
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2012, 04:42 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1