Date Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report with beginningdate and endingdate criteria, formatted as
99/99/99. When I run the report it sorts the results by month and day, but it
ignores the year that I typed in, all years are included. Does anyone know
why it is doing this?
 
Is the date field is date type?

In the report you need to sort your data using the sorting and grouping
dialog box(In the menu bar select View > Sorting and grouping) , in there
select the field you want to sort by and the order type.
 
I changed the datatype to date/time in the table, but now when I run the
report I get this error message:

This expression is typed incorrectly, or it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables. (Error 3071)
 
I don't think I was specific enough in my last reply. I have a form I use to
enter the date criteria in for the report. When I changed the data type from
text to date/time in the report, now when I use the form to enter my
criteria, I get that error code. I changed it back to text and then, in
sorting and grouping typed:

=CDate([Dateofinvoice]), the report is now sorted by year rather than month,
but the report ignores the criteria that I enter in the form, it shows all
records
 
In the record source of the report add another field

Select Dateofinvoice, Month(CDate([Dateofinvoice])) As MyMonth,
Day(CDate([Dateofinvoice])) As MyDay From TableName

In the sorting and grouping you can add, MyMonth as first sort, and MyDay as
second sort

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



Jennie said:
I don't think I was specific enough in my last reply. I have a form I use to
enter the date criteria in for the report. When I changed the data type from
text to date/time in the report, now when I use the form to enter my
criteria, I get that error code. I changed it back to text and then, in
sorting and grouping typed:

=CDate([Dateofinvoice]), the report is now sorted by year rather than month,
but the report ignores the criteria that I enter in the form, it shows all
records

Ofer said:
Is the date field is date type?

In the report you need to sort your data using the sorting and grouping
dialog box(In the menu bar select View > Sorting and grouping) , in there
select the field you want to sort by and the order type.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top