Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query by Date Range

Status
Not open for further replies.

afioresi

Technical User
Jun 24, 2003
3
0
0
US
I have an employee db and one field is employee birthdates entered in the following format: 05/10/1955, etc.

At the beginning of each month, I would like to run a report for employees who are celebrating birthdays for that month.

Being the "unconsummate" professional, I have been entering the following: Between May 1900 and May 2003.

Is there an easier step?

Thanks in advance for your responses.

Angela
 
Dear Afioresi

One suggestion

In a query make a new column for a derived field with a made up name not a current fieldname eg Birthday and place a colon after it followed by Month and in brackets the name of your date field.

In the criteria for the column enter Month(Date()) for the system date e.g.

Field Birthay:Month([Date])
Table
Sort
Show [x]
Criteria Month(Date))


Thanks

Michael



 
Thanks for your reply. I did try your advice however, when I ran the query, I had no results so, I am sure that I am just not getting it.

In the criteria for the "Birthay:Month([Date]" field, I did set the criteria as "Month(Date)". I wasn't sure if I was supposed replace Month with the actual month name so I tried that but I received an error message stating something like Data mismatch.

Then I tried replacing the (Date) portion of the criteria with the birthdate field name (BirthDate) and it didn't work.

My only work around solution is entering: Like "6/**/****" for any birthdays in June. It does work just fine but I would like something easier for other people who will be inputting the information.

Anyway, thanks once again for you reply.

Angela
 
Hello Angela

Assuming your fieldname is bithdate and I may have missed a bracket in the criteria. Date() gets the computer system date.

In the criteria for the column enter Month(Date()) for the system date e.g.

Field Birthay:Month([Birthdate])
Table
Sort
Show [x]
Criteria Month(Date())


Thanks

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top