Default Record Using Tabular

  • Thread starter Thread starter Nathan K via AccessMonster.com
  • Start date Start date
N

Nathan K via AccessMonster.com

Hello

My database keeps track of employees that are in or out of the office for the
day and allows other employees to view it. When an employee enters the
office for the day he will enter his name, and a note if he will be out of
the office at any time during the day. I also have auto date/time and other
fields.

My question is: Is there a way to show just the records from the current date
of all employees who have entered data?
I would like just todays records to be viewed by other employees when they
open the form to add their data. Basically the end result would be all the
employees that are in the office today would be in a list with a textbox
notes if they are going to be out of the office for a certain time during the
day. This way all employees would be able to see if another employee is in
the office.
Can this maybe be done by a query?

Any help is appreciated. Hopefully I was clear with my problem.
thanks
Nate
 
Yes, just create a query with the criteria
Where DateValue(YourDate) = Date();

I used the DateValue() function in case your date field contains time also.

Use the query as the recordsource for the form.
 
Thanks for the quick reply.
I'm not sure exactly how to set up the DateValue Function. My date field
does contain the time also.
Will this automatically query based on todays date, whatever it might be?
What do you mean by (YourDate)? Do I have to specify the date here? I am
assuming the DateValue goes in the date field criteria.

As you can tell i'm not too query criteria.
Thanks
Nate
Yes, just create a query with the criteria
Where DateValue(YourDate) = Date();

I used the DateValue() function in case your date field contains time also.

Use the query as the recordsource for the form.
[quoted text clipped - 23 lines]
thanks
Nate
 
Hi Nathan,

I have included a sample database that addressess your question. I show to
examples

1. Has Date() in the query as the condition

2. Shows a very simple date prompt

Hope this helps

Shirley

Nathan K via AccessMonster.com said:
Thanks for the quick reply.
I'm not sure exactly how to set up the DateValue Function. My date field
does contain the time also.
Will this automatically query based on todays date, whatever it might be?
What do you mean by (YourDate)? Do I have to specify the date here? I am
assuming the DateValue goes in the date field criteria.

As you can tell i'm not too query criteria.
Thanks
Nate
Yes, just create a query with the criteria
Where DateValue(YourDate) = Date();

I used the DateValue() function in case your date field contains time also.

Use the query as the recordsource for the form.
[quoted text clipped - 23 lines]
thanks
Nate
 
"YourDate" is the name of YOUR date field. When your date field contains
time also, you will never get an equal condition when comparing your date
field to the current date or any other date field. That is why the
DateValue() function is used. It extracts ONLY the date part of the field
so 10/22/2005 10:00 AM will = 10/22/2005.

Nathan K via AccessMonster.com said:
Thanks for the quick reply.
I'm not sure exactly how to set up the DateValue Function. My date field
does contain the time also.
Will this automatically query based on todays date, whatever it might be?
What do you mean by (YourDate)? Do I have to specify the date here? I am
assuming the DateValue goes in the date field criteria.

As you can tell i'm not too query criteria.
Thanks
Nate
Yes, just create a query with the criteria
Where DateValue(YourDate) = Date();

I used the DateValue() function in case your date field contains time
also.

Use the query as the recordsource for the form.
[quoted text clipped - 23 lines]
thanks
Nate
 
Back
Top