A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Expiry dates sql problems



 
 
Thread Tools Display Modes
  #1  
Old November 10th, 2009, 08:48 AM posted to microsoft.public.access.forms
Tia[_3_]
external usenet poster
 
Posts: 126
Default Expiry dates sql problems

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.