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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query to show current employees between dates



 
 
Thread Tools Display Modes
  #1  
Old September 3rd, 2008, 10:23 PM posted to microsoft.public.access.queries
bhx_uk
external usenet poster
 
Posts: 1
Default Query to show current employees between dates

Hello,

I am desperately trying to make a query that will show the current
employee's of our organisation between 2 dates (One is a fixed date using the
#01/01/1900#, the other is a variable).

I have the following key fields that i think are important ones. They are
Start Date, Termination Date, Current Employee.

My knowledge of Access is limited at best, i have used the NOT and Between
functions, so far all these do is show employees that are listed as
"Employee" and "Ex Employee".

Does anyone have any ideas on how i can gain access to this info?
  #2  
Old September 3rd, 2008, 10:40 PM posted to microsoft.public.access.queries
Lord Kelvan
external usenet poster
 
Posts: 637
Default Query to show current employees between dates

you have a field that is current employee is the a yes/no field or
what because thats the key

and also you have employees that are 108 years old i am quite
impressed ^_^

try

select *
from employee
where [start date] between #01/01/1900# and now()
and [current employee] = true

or

select *
from employee
where [termination date] is null

to be honest you dont need to have a field for current employee
because termination date determines that

also why between 01/01/1900 and now or are you trying to do a query
that will give you all employees between two dates so if you wanted to
know all employees between 1900 and 1920

if so then try

select *
from employee
where ([termination date] between 01/01/1900 and [enter date])
or ([start date] between 01/01/1900 and [enter date] and [termination
date] is not null)

as i said the current employee field is nor relevant because of
termination date
hope this helps

Regards
Kelvan
 




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 07:02 AM.


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