View Full Version : Expiry Date


edel
03-11-2010, 12:56 AM
Hi
I am trying to build a query that displays the field name and also the expiration date field. I need the expiration field to display all dates already passed the current date.

Thanks

vbaInet
03-11-2010, 01:34 AM
The field name or the field's value? Would need more information. A condition in the query, < Date() would work.

edel
03-11-2010, 01:49 AM
Hi,

Its an Employee training table i am completing. I have the employees name, location, training giving, date training was received and the expiry date of that training. There is about 15 required training certificates that employees must have and these must be reviewed on a continual basis. The table therefore has 45 + fields and I wanted to run a query detailing the employees name and whatever training has expired so that course can be run to ensure employees stay up to date. The difficulty I am having is that whenever the < Date () runs for the first expiry date it won't run for the next training and expiry date in that same table?

Will I have to create a new query for each training programme to show what employees require training?

Thanks,

vbaInet
03-11-2010, 01:53 AM
I would imagine the training is in a different table from the Employees? You can include all training programmes and all employees when you create your query as long as there is a direct relationship between those two entities. Just select the fields you would to be displayed from both, and put in the criteria in the training date field.

ibmfreak
03-11-2010, 02:57 AM
select employee name from employee table where expirydate<Date()
group by Date,employeename;

The condition given by vba is right you need to group the data correctly. You should write the actual sql statement instead of using the QBE.