Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009
    Posts
    10

    Unanswered: Criteria in a query

    Hi,

    I have the below formula in the query field and run fine.

    Expiration: (([shelf Life (Months)]/12*365)+[Date])

    But when I write the criteria below and not not get the data I want

    Between [enter start date] And [enter end date]

    Example: when I run just the formula I get for example dates in April 2010. But when I use the criteria and ask for data between 04/01/10 and 04/30/10 I get blank results.

    What am I doing wrong?

    Thank you for your help.

    Rubem

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Is the criteria based on the actual date field itself versus an expression? Basing criteria on an expression type or calculated field is usually problematic with date type fields.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2009
    Posts
    10

    Criteria in a query

    pkstormy,

    I have two table, one is a table for the part number characteristics where I enter the self life, in months, and another table where I enter the date the product is received.

    Rubem

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Between [enter start date] And [enter end date]

    can only be used against a date type fields.

    You can always format a date field to show it as a month (and if needed, just use the 1st day of the month to enter the data.) But having a Month field as a integer or text type field is not the best route to go if you need to do date range type totals.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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