Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002

    Question Unanswered: Dates from textboxes to query - Wildcards?

    I am trying to sort a report by date, but I cannot include the day in the sort, just the month and the year.
    I tried using a form with two textboxes, one for the month and one for the date, and added them to a query. the finished result produced 9/##/02 in the query if you picked september 2002. (I thought that since # is a number wildcard, it might select all dates from that month)
    Access comes up with an error saying the expression is too complex.

    Is there a way I can sort just by month and year and ignore the day?

  2. #2
    Join Date
    Oct 2002
    Yes, on the top line of the query (fields) add an expression:

    MonthnYear:format(Datefield,"mmyy") and just sort that.

  3. #3
    Join Date
    Aug 2002
    Use "yymm" or "yyyymm" format if you want to order it, unless you want to group the same month together...

Posting Permissions

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