Expiry dates sql problems

T

Tia

dear all,

I am doing something wrong but i dont know what is it :( i am new in
access .
i am trying to get the expiry dates list of today in order to renew
it

in the sql query it is originally showing this

SELECT [LEGAL PAPERS]![Employee] AS Employee, [LEGAL PAPERS]!
[EMPLOYMENT EXPIRY] AS [EMPLOYMENT _EXPIRY], [LEGAL PAPERS]![MISSION
VISA EXPIRY] AS [MISSION VISA EXPIRY], [LEGAL PAPERS]![LABOR CARD
EXPIRY] AS [LABOR CARD EXPIRY], [LEGAL PAPERS]![LABOR CARD EXPIRY] AS
[CONTRACT EXPIRY], [LEGAL PAPERS]![HEALTH CARD EXPIRY] AS [HEALTH CARD
EXPIRY], [LEGAL PAPERS]![OCCUPATIONAL HEALTH CARD EXPIRY] AS
[OCCUPATIONAL HEATH CARD DATE], [LEGAL PAPERS]![BASIC FOOD HYGIENE
EXPIRY] AS [BASIC FOOD HYGIENE EXPIRY], [LEGAL PAPERS]![STOOL CHECK UP
DATE] AS [STOOL CHECK UP EXPIRY], [LEGAL PAPERS]![INSURANCE EXPIRY] AS
[INSURANCE EXPIRY], [LEGAL PAPERS]![DRIVING LICENSE EXPIRY DATE] AS
[DRIVING LICENSE EXPIRY DATE], [LEGAL PAPERS]![DJ LICENSE RENEWAL] AS
[DJ LICENSE RENEWAL]
FROM [LEGAL PAPERS];


i deleted everything and i added this for the expiry dates, it is
working perfectly for the first expiry "Employment expiry" Than the
query is blank in the second " Mission visa expiry", once i put the
3rd one

I receive the microsoft access database enginecould not find the
object. Make sure the object exits or the spelling
This is what i am using

SELECT [LEGAL PAPERS]![Employee] AS Employee,[LEGAL PAPERS]!
[EMPLOYMENT EXPIRY] AS ExpiryDate, "EMPLOYMENT _EXPIRY" AS
DocumentType
FROM [LEGAL PAPERS]
WHERE [LEGAL PAPERS]![EMPLOYMENT EXPIRY] =Date()
UNION ALL
SELECT [LEGAL PAPERS]![Employee] AS Employee,[LEGAL PAPERS]![MISSION
VISA EXPIRY] AS ExpiryDate, "MISSION VISA" AS DocumentType
FROM [LEGAL PAPERS]
WHERE [LEGAL PAPERS]![MISSION VISA EXPIRY] =Date()
UNION ALL
SELECT [LEGAL PAPERS]![Employee] AS Employee,[LEGAL PAPERS]![LABOR
CARD EXPIRY] AS ExpiryDate, "LABOR CARD EXPIRY" AS DocumentType
FROM [LEGAL PAPERS]
WHERE [LEGAL PAPERS]![LABOR CARD EXPIRY] =Date();

Please help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top