Results 1 to 6 of 6
  1. #1
    allanf1 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2021
    Posts
    1

    DateAdd Function Stopped Working

    Good Morning:



    I have a little bit of an emergency with a failure in a customer-facing database. We use a data pump to dump Access tables each evening and then reload the tables. We use the following criteria in a query >=DateAdd("ww",-53,Date()) that has worked for years in delimiting data. Following a failure reported by a client, I noticed that by running the query as a select query, that the recordset was not being delimited. I don't know why. Does anyone have an idea?

    Regards,

    Allan in Panacea Florida

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,688
    Following a failure reported by a client, I noticed that by running the query as a select query, that the recordset was not being delimited. I don't know why. Does anyone have an idea?
    I don't understand how the DateAdd set up can change "delimiting". Please provide the relevant vba/sql code and some sample data (input and expected output). We need some more details.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    1,203
    DateAdd() does not delimit data?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?search_query=debug+access+vba



  4. #4
    Cottonshirt is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2018
    Posts
    97
    I don't understand how the DateAdd set up can change "delimiting".
    DateAdd() does not delimit data?
    I'm not sure what folk think "delimit" means, but the criteria quoted by the op ">=DateAdd("ww",-53,Date())" will limit the data dump to items with a date in the previous 53 weeks.

    that agrees with any reasonable defintion of delimit that I'm aware of. "to limit or restrict the boundaries of".


    Cottonshirt

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    1,203
    I was thinking more along the lines of delimited as in a 'comma delimited file'? I dare say the others were as well?
    Not as criteria for restricting data for that data file?, which I agree that code should do.?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?search_query=debug+access+vba



  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    2,574
    @ allanf1
    If you put the expression in a select query as a calculated field does it show you the right date - OneYearAgo: DateAdd("ww",-53,Date()? You should look at the field on which you're adding the criteria as the data type might have changed and is no longer a date field.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. just stopped working....
    By fishhead in forum Macros
    Replies: 3
    Last Post: 12-12-2018, 09:30 AM
  2. DateAdd Function
    By banno1 in forum Access
    Replies: 1
    Last Post: 08-02-2018, 11:54 AM
  3. DateAdd function not working
    By JackieFeng in forum Forms
    Replies: 19
    Last Post: 05-03-2016, 08:40 AM
  4. Replies: 1
    Last Post: 03-20-2014, 07:51 AM
  5. DateAdd Function
    By Desstro in forum Programming
    Replies: 3
    Last Post: 04-03-2011, 01:45 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