Hard to say without knowing a lot more about your table structure.
You can test the current date and see if any record exists for that date.
This expression would test the current date obviously it could be modified to
test for any date. If it returns zero then no child is logged in for today's
date.
DCount("*","[Log Attendance Table]","ChildLoggedINDate >=Date() and
ChildLoggedInDate < Date()+1)
If you want to do this for many dates at once and dynamically update the
result it would be possible but tricky.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
coconut78 wrote:
> Howdy,
>
> I have an access program for a home daycare. I use this program to log when
> each child is dropped off/picked up. I would like to include a menu option
> as well.
>
> What I want is to alternate between 15 menus for each day any child is
> present. For example, today is menu #3, and tomorrow... if there are any
> kids... menu #4. If there aren't any kids... I want to wait for menu# 4 for
> tomorrow. The thing that makes this tough is that there is no certain kid
> that is here every single day we're open.
>
> I have one table that logs the children (Childname, time in, time out,
> date), and I have another table with the 15 menus. (1,2,3,4,etc..)
>
> Anybody have any ideas?
|