one year anniversary

Peterson

Bob
Local time
Today, 11:20
Joined
Jul 25, 2008
Messages
28
I have a table of 266 employee’s information one of the fields in my table is Hire Date. I have created a query with the criteria of DateAdd("yyyy",1,[Hire Date]) I am trying to come up with a one year anniversary date for all employees and have access reminded me the employee one year anniversary is due, a month early would be great The criteria I have set is not working. Where do I go from here keep in mind I am a beginner. Whatever you tell me has to come with instructions.
 
If you want a reminder a month early then use DateAdd("m",11,[Hire Date])
 
Last edited:
What you have looks correct, if its not working you might need to provide more info. If you want it a month earlier you can do this:

DateAdd ("m", 11, [Hire Date])
 
Whoa guys this is a duplicate thread. Peterson you were asked to post your SQL on the previous thread, I think that is still required. There are 3 options at the query level on the dropdown, design, view ans SQL, select the latter and copy and paste it into this thread and put a note on the other thread that it is closed.

Brian
 
I don't know how to do that, I looked for a dropdown with SQL I can't find it. Is it on the toolbar over the queries? I see design but nothing about SQL
 
I found it!!!

SELECT [Employee Master File].[Last Name], [Employee Master File].[First Name], [Employee Master File].[Employee #], [Employee Master File].[Hire Date], [Employee Master File].Status
FROM [Employee Master File]
WHERE ((([Employee Master File].[Hire Date])=DateAdd("m",11,[Hire Date])) AND (([Employee Master File].Status)="A"));
 
Try changing your WHERE clause to
WHERE (((Date() = DateAdd("m",11,[Employee Master File].[Hire Date]))

What you had before could never work because hiredate could never equal hiredate + 11 months
 
Last edited:
SELECT [Employee Master File].[Last Name], [Employee Master File].[First Name], [Employee Master File].[Employee #], [Employee Master File].[Hire Date], [Employee Master File].Status
FROM [Employee Master File]
WHERE (((Date() = DateAdd("m",11,[Employee Master File].[Hire Date])) AND (([Employee Master File].Status)="A"));

I now get Syntax error in query expression with this.
 
You need to check the () in the where clause, I would code

(Date() = DateAdd("m",11,[Employee Master File].[Hire Date]) AND [Employee Master File].Status ="A");

But you should check it yourself to understand what is going on

Brian
 
Are you trying to pull employees with an "exact" one year anniversary?
 
I have the employees Hire date our company gives out one year gold pins I would like to create a query that I could create a report from that would reminded me a month before their one year anniversary to give us time to order the pins
 
Ok... I would use DateDiff

DateDiff("m",[Employee Master File].[Hire Date],Date()) = 11

This will give you all the employees that have a hire date that is within the 11 month window.

Hope that helps.

Jeremy
 

Users who are viewing this thread

Back
Top Bottom