Results 1 to 5 of 5
  1. #1
    Axsom is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    3

    Lightbulb Can Access report the date data was imported, as a static date?

    I receive excel files from multiple sources each month. Mainly it covers the same items, and I have to look for changes, i.e. have items been added or removed?


    I want to set Access to import from a form button, appending to the existing table. To separate by month, as is the request, can an Assess query find the date data was added, say with the date() function, then set that date as a static number that never changes?

    I was doing this manually with excel, but I was separating everything out using a folder structure and appending the folder name (Jan, Feb, ext.), using a Data Validation selection.

    I am pretty new to Access, so I am sure there is a simple solution.

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    In your access import table have a new field called ImportDate and set it's default value to either Date() or Now() if you want the time and date.
    Any new records will have the current date added automatically.

    If I've grabbed the wrong end of the stick let us know where I have misunderstood your requirement.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Axsom is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    3
    Quote Originally Posted by Minty View Post
    In your access import table have a new field called ImportDate and set it's default value to either Date() or Now() if you want the time and date.
    Any new records will have the current date added automatically.

    If I've grabbed the wrong end of the stick let us know where I have misunderstood your requirement.
    ok, but what happens when I import next month's data, won't last month's date just update to this month's? That would defeat the purpose. When I import this month, I need to set the date of import, then next month when appending the new data to the table, I need last month's date to stay last month's, with the new data getting this month's data.
    I thought about doing separate tables, but wouldn't the same thing happen when running a comparison query, the Date() or Now() would update to the date the query ran and not the date of import. - right???
    Again, I am new to working with Access, but the functions work the same as in Excel - right - which I have much more experience in...
    you know how, in Excel, you can copy a cell that shows the value of a formula in it, then when you copy and 'paste value'? You get the value in the cell, not the formula returning a value... I need to do something like that.

  4. #4
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    No a default value only effects new records. It has no effect on existing records.
    If you don't update the import date field by some other method it remains static for as long as it isn't touched.

    You can prove this by adding a new field to an existing dummy table and setting the default value before saving the design changes.
    Once saved then look at new field in the table data. The existing records shouldn't have any values in that field.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    Axsom is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    3
    Well, I'm going to chalk this up to my inexperience...lol
    I scoured through the syntax of all the functions in the date/time category, before finding this forum (the MS Access forum, posted 24hrs before this one, still has no results-fyi). So this has just become an excellent resource...lol

    Thanks for your speedy reply, and help - I will mark it as solved

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

Similar Threads

  1. Replies: 5
    Last Post: 12-09-2019, 05:33 PM
  2. Replies: 4
    Last Post: 11-20-2018, 11:57 PM
  3. Replies: 7
    Last Post: 02-25-2014, 03:11 PM
  4. Replies: 4
    Last Post: 09-30-2013, 05:29 AM
  5. Replies: 3
    Last Post: 08-21-2012, 03:05 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