Results 1 to 4 of 4
  1. #1
    RAJESHKUMAR R is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    48

    How to Maintain Historical Data on Daily Basis (One Below Other)

    Dear Experts,



    I would need your suggestion on my subjected Query!

    I have an Access Table Named as “Demand” which is having multiple column!

    Also, I have an Excel worksheet Named as “Demand Input”. Every Day Based on given Input (Manual input from ERP), Excel do all Formation and keep it ready in “Demand Input” worksheets for
    transfer to MS Access

    The Help which I required here is, With the help of programming, How to Pull those “Demand Input” Worksheet Data to “Demand” Access Table (Note: Column Heading is Exactly Same) to the last blank cell on Daily basis!

    Thanks & Regards,
    Rajeshkumar R
    Last edited by RAJESHKUMAR R; 12-19-2017 at 10:37 PM. Reason: Query Resolved

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    import records from a file


    1. save the file (excel, or text) to a generic name everytime: File2import.xls (or File2import.txt)
    2. attach (link) the file as an external table, like tFile2Import
    3. make a query that appends data from tFile2Import table to the target table.
    this query would use * to import all fields with the same name, but if the 2 tables dont have the same names, you must add the source fields and target fields to the query.
    4. put this query in a macro, run the macro.


    Once this is done, the import steps are now:
    1. save the new file and overwrite the old one
    2. run the macro
    done.

  3. #3
    Join Date
    Apr 2017
    Posts
    1,776
    Even when normally in your Excel file are only new entries, to be on safe side it is wise to make sure the append query to add only new data.

    Possible ways:
    1. In excel table, you create an unique ID column (reads ID from ERP system, or calculates an ID based on date and on some row identifier(s)). In Access file, you have a field for this ID too. The append query will have the syntax like
    Code:
    INSERT INTO (FieldList)
    SELECT ... FROM LinkedExcelTable WHERE ExcelID Not In (SELECT ExcelID FROM AccessTable)
    2. You have several fields in Excel table, which together give an unique set of values. In Append query, you use Left Join on LinkedExcelTable and AccessTable, and insert rows where fields in linked AccessTable are Null.

  4. #4
    RAJESHKUMAR R is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    48
    Dear Experts,

    Thanks for your valuable suggestions!

    Thanks & Regards,
    Rajeshkumar R

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

Similar Threads

  1. Dealing with historical data on a Form
    By Yogibear in forum Access
    Replies: 1
    Last Post: 02-26-2014, 10:40 AM
  2. Handling Historical Data with different assignments
    By crimedog in forum Database Design
    Replies: 5
    Last Post: 12-12-2013, 09:43 AM
  3. Replies: 1
    Last Post: 09-03-2013, 10:27 AM
  4. Access for recordig visits on a Daily Basis
    By phineas629 in forum Access
    Replies: 4
    Last Post: 05-13-2011, 11:18 PM
  5. Historical data
    By Accessgrasshopper in forum Access
    Replies: 0
    Last Post: 02-28-2011, 06:39 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