Determining # of employees at point in time

L

Les

Hi Teri,
Create a parameter query, which will allow you to
specify a date. Select the data fields that you want to
display. Include HireDate and TermDate.

In criteria for HireDate you want:
<=[Enter Date]
In criteria for TermDate you want:
 
L

Les

Could you bring your query up in design view, then under
view, select sql view? Copy and paste this into a post,
so I can see exactly what you have typed.

-----Original Message-----
Hi Les,

Thanks for responding. I tried to do that and I got the following error
message:

"This expression is typed incorrectly or is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables."

Any ideas?

Les said:
Hi Teri,
Create a parameter query, which will allow you to
specify a date. Select the data fields that you want to
display. Include HireDate and TermDate.

In criteria for HireDate you want:
<=[Enter Date]
In criteria for TermDate you want:
[Enter Date] or is null

-----Original Message-----
We have an employee database. I would like to run a query that tells me who
was working for us at a point in time. Example: what drivers were working
for us on February 1, 2004?

Our database has a HireDate and TermDate field. Can someone please help?
.
.
 
L

Les

In your criteria for termdate, you have Term, and not
TermDate.

-----Original Message-----
Here you go :)

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType, tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate]) AND
((tblEmployeeInfo.Term)>[Enter TermDate] Or
(tblEmployeeInfo.Term) Is Null));
Les said:
Could you bring your query up in design view, then under
view, select sql view? Copy and paste this into a post,
so I can see exactly what you have typed.

-----Original Message-----
Hi Les,

Thanks for responding. I tried to do that and I got
the
following error
message:

"This expression is typed incorrectly or is too
complex
to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of
the
expression to
variables."

Any ideas?

:

Hi Teri,
Create a parameter query, which will allow you to
specify a date. Select the data fields that you
want
to
display. Include HireDate and TermDate.

In criteria for HireDate you want:
<=[Enter Date]
In criteria for TermDate you want:
[Enter Date] or is null


-----Original Message-----
We have an employee database. I would like to run a
query that tells me who
was working for us at a point in time. Example: what
drivers were working
for us on February 1, 2004?

Our database has a HireDate and TermDate field. Can
someone please help?
.


.
.
 
L

Les

Teri,
I missed this the first time, but your query is
prompting you for 2 different dates, right? And you
really only want 1 date. The example you gave was "Who
was working there on Feb. 1, 2004". Just replace where
you have [Enter HireDate] and [Enter TermDate] with [Enter
WorkDate].
The query should just prompt you for 1 date, and you
should get the results you're after.

-----Original Message-----
Hi Les,

Yes, we have a field for "Term" which indicates whether or not they have
terminated. I changed the TermDate criteria as you instructed. (See copy of
the sql view.) When I do this, the query only returns about 5 names; those
individuals who have been with us since, say 1/1/95 through current. What
I'm trying to do is run a query that will tell me who exactly was working for
us on a given day.

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType, tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate]) AND
((tblEmployeeInfo.TermDate)>[Enter TermDate] Or (tblEmployeeInfo.TermDate) Is
Null));


Les said:
In your criteria for termdate, you have Term, and not
TermDate.

-----Original Message-----
Here you go :)

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle,
tblEmployeeInfo.PositionType,
tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate]) AND
((tblEmployeeInfo.Term)>[Enter TermDate] Or
(tblEmployeeInfo.Term) Is Null));
:

Could you bring your query up in design view, then under
view, select sql view? Copy and paste this into a post,
so I can see exactly what you have typed.


-----Original Message-----
Hi Les,

Thanks for responding. I tried to do that and I
got
the
following error
message:

"This expression is typed incorrectly or is too complex
to be evaluated.
For example, a numeric expression may contain too many
complicated elements.
Try simplifying the expression by assigning parts
of
the
expression to
variables."

Any ideas?

:

Hi Teri,
Create a parameter query, which will allow you to
specify a date. Select the data fields that you want
to
display. Include HireDate and TermDate.

In criteria for HireDate you want:
<=[Enter Date]
In criteria for TermDate you want:
[Enter Date] or is null


-----Original Message-----
We have an employee database. I would like to
run
a
query that tells me who
was working for us at a point in time.
Example:
what
drivers were working
for us on February 1, 2004?

Our database has a HireDate and TermDate field. Can
someone please help?
.


.


.
.
 
L

Les

Could you copy the code for me again? It's easier to see
it.
Thanks.
-----Original Message-----
Les,
Where do I put [Enter WorkDate]? When I put it in the spots you instructed,
I get a blank row. Sorry I'm being such a pain; I really do appreciate your
taking the time to help me with this!

Les said:
Teri,
I missed this the first time, but your query is
prompting you for 2 different dates, right? And you
really only want 1 date. The example you gave was "Who
was working there on Feb. 1, 2004". Just replace where
you have [Enter HireDate] and [Enter TermDate] with [Enter
WorkDate].
The query should just prompt you for 1 date, and you
should get the results you're after.

-----Original Message-----
Hi Les,

Yes, we have a field for "Term" which indicates
whether
or not they have
terminated. I changed the TermDate criteria as you instructed. (See copy of
the sql view.) When I do this, the query only returns about 5 names; those
individuals who have been with us since, say 1/1/95 through current. What
I'm trying to do is run a query that will tell me who exactly was working for
us on a given day.

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle,
tblEmployeeInfo.PositionType,
tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate]) AND
((tblEmployeeInfo.TermDate)>[Enter TermDate] Or (tblEmployeeInfo.TermDate) Is
Null));


:

In your criteria for termdate, you have Term, and not
TermDate.


-----Original Message-----
Here you go :)

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType,
tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter
HireDate])
AND
((tblEmployeeInfo.Term)>[Enter TermDate] Or
(tblEmployeeInfo.Term) Is Null));


:

Could you bring your query up in design view, then
under
view, select sql view? Copy and paste this into a
post,
so I can see exactly what you have typed.


-----Original Message-----
Hi Les,

Thanks for responding. I tried to do that and I got
the
following error
message:

"This expression is typed incorrectly or is too
complex
to be evaluated.
For example, a numeric expression may contain
too
many
complicated elements.
Try simplifying the expression by assigning
parts
of
the
expression to
variables."

Any ideas?

:

Hi Teri,
Create a parameter query, which will allow
you
to
specify a date. Select the data fields that you
want
to
display. Include HireDate and TermDate.

In criteria for HireDate you want:
<=[Enter Date]
In criteria for TermDate you want:
[Enter Date] or is null


-----Original Message-----
We have an employee database. I would like
to
run
a
query that tells me who
was working for us at a point in time. Example:
what
drivers were working
for us on February 1, 2004?

Our database has a HireDate and TermDate field.
Can
someone please help?
.


.


.


.
.
 
L

Les

Okay,
I changed the code. See below. Did you get the blank
row when you ran the query? Did it prompt you for a
date? The other thing I would make sure is that the date
formats are correct. For example, if your hire dates and
term dates look like 2/1/2004, make sure you use the same
format when you answer the prompt.
Hope this helps.

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType,
tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter WorkDate]) AND
((tblEmployeeInfo.TermDate)>[Enter WorkDate] Or
(tblEmployeeInfo.TermDate) Is
Null));
-----Original Message-----
SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType, tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate]) AND
((tblEmployeeInfo.TermDate)>[Enter TermDate] Or (tblEmployeeInfo.TermDate) Is
Null));


Les said:
Could you copy the code for me again? It's easier to see
it.
Thanks.
-----Original Message-----
Les,
Where do I put [Enter WorkDate]? When I put it in the spots you instructed,
I get a blank row. Sorry I'm being such a pain; I
really
do appreciate your
taking the time to help me with this!

:

Teri,
I missed this the first time, but your query is
prompting you for 2 different dates, right? And you
really only want 1 date. The example you gave was "Who
was working there on Feb. 1, 2004". Just replace where
you have [Enter HireDate] and [Enter TermDate] with [Enter
WorkDate].
The query should just prompt you for 1 date, and you
should get the results you're after.


-----Original Message-----
Hi Les,

Yes, we have a field for "Term" which indicates whether
or not they have
terminated. I changed the TermDate criteria as you
instructed. (See copy of
the sql view.) When I do this, the query only returns
about 5 names; those
individuals who have been with us since, say 1/1/95
through current. What
I'm trying to do is run a query that will tell me who
exactly was working for
us on a given day.

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType,
tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter
HireDate])
AND
((tblEmployeeInfo.TermDate)>[Enter TermDate] Or
(tblEmployeeInfo.TermDate) Is
Null));


:

In your criteria for termdate, you have Term, and not
TermDate.


-----Original Message-----
Here you go :)

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate,
tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle,
tblEmployeeInfo.PositionType,
tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate])
AND
((tblEmployeeInfo.Term)>[Enter TermDate] Or
(tblEmployeeInfo.Term) Is Null));


:

Could you bring your query up in design view, then
under
view, select sql view? Copy and paste this
into
a
post,
so I can see exactly what you have typed.


-----Original Message-----
Hi Les,

Thanks for responding. I tried to do that and I
got
the
following error
message:

"This expression is typed incorrectly or is too
complex
to be evaluated.
For example, a numeric expression may contain too
many
complicated elements.
Try simplifying the expression by assigning parts
of
the
expression to
variables."

Any ideas?

:

Hi Teri,
Create a parameter query, which will
allow
you
to
specify a date. Select the data fields
that
you
want
to
display. Include HireDate and TermDate.

In criteria for HireDate you want:
<=[Enter Date]
In criteria for TermDate you want:
[Enter Date] or is null


-----Original Message-----
We have an employee database. I would
like
to
run
a
query that tells me who
was working for us at a point in time.
Example:
what
drivers were working
for us on February 1, 2004?

Our database has a HireDate and TermDate field.
Can
someone please help?
.


.


.


.


.
.
 
L

Les

Teri,
You're SO welcome. I know how frustrated I feel when I
can't solve something, so I try to help others avoid that
same feeling. Have a great day!!

-----Original Message-----
YOU ARE THE MASTER!!! Thank you so much, Les, for taking time out of your
day to help me with this. IT WORKS PERFECTLY!!

Teri said:
Hi Les,

Yes, we have a field for "Term" which indicates whether or not they have
terminated. I changed the TermDate criteria as you instructed. (See copy of
the sql view.) When I do this, the query only returns about 5 names; those
individuals who have been with us since, say 1/1/95 through current. What
I'm trying to do is run a query that will tell me who exactly was working for
us on a given day.

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType, tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate]) AND
((tblEmployeeInfo.TermDate)>[Enter TermDate] Or (tblEmployeeInfo.TermDate) Is
Null));


Les said:
In your criteria for termdate, you have Term, and not
TermDate.


-----Original Message-----
Here you go :)

SELECT tblEmployeeInfo.SSN, tblEmployeeInfo.LName,
tblEmployeeInfo.InformalName, tblEmployeeInfo.Gender,
tblEmployeeInfo.HireDate, tblEmployeeInfo_OfficeCode,
tblEmployeeInfo.Jobtitle, tblEmployeeInfo.PositionType,
tblEmployeeInfo.Term,
tblEmployeeInfo.TermDate, tblEmployeeInfo.SepReason
FROM tblEmployeeInfo
WHERE (((tblEmployeeInfo.HireDate)<=[Enter HireDate]) AND
((tblEmployeeInfo.Term)>[Enter TermDate] Or
(tblEmployeeInfo.Term) Is Null));


:

Could you bring your query up in design view, then
under
view, select sql view? Copy and paste this into a
post,
so I can see exactly what you have typed.


-----Original Message-----
Hi Les,

Thanks for responding. I tried to do that and I got
the
following error
message:

"This expression is typed incorrectly or is too
complex
to be evaluated.
For example, a numeric expression may contain too many
complicated elements.
Try simplifying the expression by assigning parts of
the
expression to
variables."

Any ideas?

:

Hi Teri,
Create a parameter query, which will allow you to
specify a date. Select the data fields that you
want
to
display. Include HireDate and TermDate.

In criteria for HireDate you want:
<=[Enter Date]
In criteria for TermDate you want:
[Enter Date] or is null


-----Original Message-----
We have an employee database. I would like to run
a
query that tells me who
was working for us at a point in time. Example:
what
drivers were working
for us on February 1, 2004?

Our database has a HireDate and TermDate field.
Can
someone please help?
.


.


.
.
 
Top