• Query Criteria Construct

    Author
    Topic
    #459215

    Hi, could one please give me some guidance and how I would ask a query to show me a list of entries where a date within a record is greater than 14 days from now?

    TVM, Darren.

    Viewing 0 reply threads
    Author
    Replies
    • #1157262

      Hi, could one please give me some guidance and how I would ask a query to show me a list of entries where a date within a record is greater than 14 days from now?

      TVM, Darren.

      If the date field was called EventDate, your criterion would be [EventDate] > Date + 14

      Date calls the Date function that returns today’s date. Dates are just numbers, so adding 14 to it creates another date 14 days from now.

      • #1157270

        Access requires brackets after the function name in expressions (unlike in VBA code), so the condition would be

        >Date()+14

        If you omit the brackets, Date will be interpreted as a string.

        • #1157273

          Access requires brackets after the function name in expressions (unlike in VBA code), so the condition would be

          >Date()+14

          If you omit the brackets, Date will be interpreted as a string.

          Many thanks, Hans.

          Darren.

    Viewing 0 reply threads
    Reply To: Query Criteria Construct

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: