G
Guest
Hello, I have built a database, and I can't seem to be able to query by
month. I have setup the daily and yearly queries, but month only works for
the present month, not past ones. I have a nice print screen of my query,
but I guess we can't post files up here, so it may be a bit difficult to
explain what I've done. The database indexes by computer dates, so If I back
the computer date to last month, the query works fine. I am using a
parameter to prompt the user for an end date. Then the query is set to take
the 1st of the month, to the end date using this in the criteria:
field: TheDate
criteria: Between Day(Date()) And [Enter End Date:]
Field: expr:Month(TheDate)
criteria: Month(Date())
I understand why it doens't work, but I'm not sure if there's a statement to
tell it to take the month that was inputed in the [Enter End Date:] of the
parameter statement.
Thx for any help
Eric
month. I have setup the daily and yearly queries, but month only works for
the present month, not past ones. I have a nice print screen of my query,
but I guess we can't post files up here, so it may be a bit difficult to
explain what I've done. The database indexes by computer dates, so If I back
the computer date to last month, the query works fine. I am using a
parameter to prompt the user for an end date. Then the query is set to take
the 1st of the month, to the end date using this in the criteria:
field: TheDate
criteria: Between Day(Date()) And [Enter End Date:]
Field: expr:Month(TheDate)
criteria: Month(Date())
I understand why it doens't work, but I'm not sure if there's a statement to
tell it to take the month that was inputed in the [Enter End Date:] of the
parameter statement.
Thx for any help
Eric