Results 1 to 2 of 2
  1. #1
    TC0126 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    1

    Calculating Dates

    I am trying to do a date calculation in a query that worked in access 97 but is not working in access 2007.

    I want my query to return data for all transactions that occur in a certain date range relative to the current date. I am trying to collect this data in one week increments. For instance, I have a query titled 90days. I want this query to collect data for transactions that have a sale date range beginning 90 days prior to the current date and ending 96 days prior to the current date. In the old program I put the following expression in the criteria field for my sale date:

    Between Date()-90 and Date()-96

    With this expression in my query, I get the following error message when I try to run the query in access 2007:



    "Undefined function 'Date' in expression."

    I am certainly not a power user of this program, but I depend on these queries to do a weekly mail merge with my database, and I am at a loss to fix this error.

    Thanks in advance for your time and help.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,095
    Typically when you see that error on a common function it's a reference problem:

    http://allenbrowne.com/ser-38.html

    http://www.accessmvp.com/djsteele/Ac...nceErrors.html
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Calculating Dates
    By AJ0424 in forum Programming
    Replies: 1
    Last Post: 07-14-2009, 08:29 AM
  2. Calculating Downtime
    By MFS in forum Access
    Replies: 1
    Last Post: 04-28-2009, 11:59 AM
  3. Help requested for calculating age
    By techexpressinc in forum Queries
    Replies: 3
    Last Post: 01-28-2009, 11:29 AM
  4. Calculating a sum on a report
    By missourijc in forum Reports
    Replies: 0
    Last Post: 10-30-2008, 07:21 PM
  5. calculating due dates in access
    By trixxnixon in forum Forms
    Replies: 0
    Last Post: 09-28-2008, 12:35 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