How to get query/report to show an entry if system date

J

JeremyReger

It is a little more complicated than that for me atleast.
Here is the situation: I am making a "Daily Report" for our manning. We
have people go on vaction and have appointments often in our office.

I have built a database that we can enter in all of this information where
(vacations, appointments, people coming and people going, etc...)

My situation is I want to make a Daily Report to send out to each section
everyday, but I do not want everything to show up for each form on the
report. I only want what is going to affect that day.

For Example:
If Jason Jones is on vacation from 01 Sept 07 to 15 Sept 07 and it is only 8
Sep 07 I need his vacation to still show up on the query then onto the
report.

I have the appointments down because I can just put Between Date() and
Date() and that will show everything for that day. But I cannot get it to
show up if it the date is in between the two dates.

I have it set up as 2 columns in the form "Start Date" and "Return Date"
and I need it to show up if the system date "Date()" is in between those
dates.

And where would I enter this code... which column ?
 
K

KARL DEWEY

This should work for you --
SELECT Attendance.Employee, Attendance.Absence, Attendance.OutDate,
Attendance.Return
FROM Attendance
WHERE (((Date()) Between Int([OutDate]) And Int([Return])));

The Int() function removes any time attached to the date.
 
J

JeremyReger

Absolutely Great! If anyone researches this after me, I was confused at the
Attendance variable, but If you copy this:
(((Date()) Between Int([OutDate]) And Int([Return])))
without the ";" and enter it in a "criteria" It will make a new column with
the details. you just need to modify the [OutDate] and [Return] to whatever
you have the date column labeled as for Example mine was:

(((Date()) Between Int([Depart Date]) And Int([Return Date])))

Excellent! I applaude you Mr. Karl Dewey you are my Hero for the day!


KARL DEWEY said:
This should work for you --
SELECT Attendance.Employee, Attendance.Absence, Attendance.OutDate,
Attendance.Return
FROM Attendance
WHERE (((Date()) Between Int([OutDate]) And Int([Return])));

The Int() function removes any time attached to the date.
--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
It is a little more complicated than that for me atleast.
Here is the situation: I am making a "Daily Report" for our manning. We
have people go on vaction and have appointments often in our office.

I have built a database that we can enter in all of this information where
(vacations, appointments, people coming and people going, etc...)

My situation is I want to make a Daily Report to send out to each section
everyday, but I do not want everything to show up for each form on the
report. I only want what is going to affect that day.

For Example:
If Jason Jones is on vacation from 01 Sept 07 to 15 Sept 07 and it is only 8
Sep 07 I need his vacation to still show up on the query then onto the
report.

I have the appointments down because I can just put Between Date() and
Date() and that will show everything for that day. But I cannot get it to
show up if it the date is in between the two dates.

I have it set up as 2 columns in the form "Start Date" and "Return Date"
and I need it to show up if the system date "Date()" is in between those
dates.

And where would I enter this code... which column ?
 
K

KARL DEWEY

I was confused at the Attendance variable,
That is just the name I gave to the table so I could test it.
--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
Absolutely Great! If anyone researches this after me, I was confused at the
Attendance variable, but If you copy this:
(((Date()) Between Int([OutDate]) And Int([Return])))
without the ";" and enter it in a "criteria" It will make a new column with
the details. you just need to modify the [OutDate] and [Return] to whatever
you have the date column labeled as for Example mine was:

(((Date()) Between Int([Depart Date]) And Int([Return Date])))

Excellent! I applaude you Mr. Karl Dewey you are my Hero for the day!


KARL DEWEY said:
This should work for you --
SELECT Attendance.Employee, Attendance.Absence, Attendance.OutDate,
Attendance.Return
FROM Attendance
WHERE (((Date()) Between Int([OutDate]) And Int([Return])));

The Int() function removes any time attached to the date.
--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
It is a little more complicated than that for me atleast.
Here is the situation: I am making a "Daily Report" for our manning. We
have people go on vaction and have appointments often in our office.

I have built a database that we can enter in all of this information where
(vacations, appointments, people coming and people going, etc...)

My situation is I want to make a Daily Report to send out to each section
everyday, but I do not want everything to show up for each form on the
report. I only want what is going to affect that day.

For Example:
If Jason Jones is on vacation from 01 Sept 07 to 15 Sept 07 and it is only 8
Sep 07 I need his vacation to still show up on the query then onto the
report.

I have the appointments down because I can just put Between Date() and
Date() and that will show everything for that day. But I cannot get it to
show up if it the date is in between the two dates.

I have it set up as 2 columns in the form "Start Date" and "Return Date"
and I need it to show up if the system date "Date()" is in between those
dates.

And where would I enter this code... which column ?
 
J

JeremyReger

You got it... it took me about five minutes to crawl out of my pea brain to
figure that out, but I really do appreciate it!
 

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