比较表格中的所有日期 [英] To Compare all dates in a table
问题描述
亲爱的所有人,
有些人可以帮我解决这个问题,我只是新手,现在我正在努力为人力资源开发数据库。
我面临的问题是,我需要检查员工的所有护照到期日,并将其与now()&进行比较。如果不到一个月必须给一个mssge框。我怎么能做到这一切,我如何比较一下表中的所有日期并启动Mssge?
请帮帮我
我有一个名为AdminStaff的表,我要检查的是PassportExpiryDate
Pramod
Dear All,
Can Some body help me on this, im just new to access, and now im trying to develop a database for Human resourses.
The problem im facing is that, i need to check all the passport expiry dates of employees and compare it with now() & if its less than one month must give a mssge box. How can i doo all these, how can i compare all the dates in a table in start up itself and give the Mssge?
Please help me
I have a Table called AdminStaff and the feild i want to check is PassportExpiryDate
Pramod
推荐答案
亲爱的所有人,
有些人可以帮我这个,我只是新访问,现在我正在尝试为人力资源开发一个数据库。
我面临的问题是,我需要检查员工的所有护照到期日,并将其与now()&如果不到一个月必须给一个mssge框。我怎么能做到这一切,我如何比较一下表中的所有日期并启动Mssge?
请帮帮我
我有一个名为AdminStaff的表,我要检查的是PassportExpiryDate
Pramod
Dear All,
Can Some body help me on this, im just new to access, and now im trying to develop a database for Human resourses.
The problem im facing is that, i need to check all the passport expiry dates of employees and compare it with now() & if its less than one month must give a mssge box. How can i doo all these, how can i compare all the dates in a table in start up itself and give the Mssge?
Please help me
I have a Table called AdminStaff and the feild i want to check is PassportExpiryDate
Pramod
假设你的表名称是员工,并且您在员工中有[LastName]和[Expiry Date]字段,以下代码放置在您的主要表单的Open()事件中将列出其Passport到期日期将在一个月内的所有员工当前日期(< 31天)。此信息将列在消息框中:
Assuming your Table Name is Employees, and you have a [LastName] and an [Expiry Date] Field in Employees, the following code placed in the Open() Event of you Main Form will list all the Employees whose Passport Expiration Date will fall within a Month of the Current Date (< 31 days). This information will be listed in a Message Box:
以下SQL应该为您找到正确的记录:
The following SQL should find the correct records for you :
假设您的表名是Employees,并且Employees中有[LastName]和[Expiry Date]字段,以下代码放在您Main Form的Open()事件中将列出所有Employees其护照到期日将在当前日期的一个月内(< 31天)。此信息将列在消息框中:
Assuming your Table Name is Employees, and you have a [LastName] and an [Expiry Date] Field in Employees, the following code placed in the Open() Event of you Main Form will list all the Employees whose Passport Expiration Date will fall within a Month of the Current Date (< 31 days). This information will be listed in a Message Box:
这篇关于比较表格中的所有日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!