Cannot Access Dates in Several Columns

N

NicoleJH

I have several kittens I am trying to keep track of when to administer 7
different vaccinations to. I have a target date set for each vaccine. I would
like to check each week which kittens need a vaccine or more than one
vaccine. Can I create one query that will look through all 7 vaccinations to
see if the vaccination date is in the current week?
 
M

Michel Walsh

You can do it with the query designer, but put each criteria on a different
line. That is, if VaccinationType1 hold the scheduled date for vaccination
1, type:


Between 1+ Date() - DatePart("w", Date() ) AND 7+Date()-DatePart("w",
Date() )

as criteria. Under VaccinationType2, type the same criteria, BUT in a
different line. Same for VaccinationsType3, again, the same criteria, but on
a third different line, and so on.


Vanderghast, Access MVP
 
N

NicoleJH

Thank you for your answer to this problem. Will I have to enter this week's
dates to make it work or does it automatically change for each week? I wasn't
sure if the date part of the criteria means that I supply or it will do the
job itself. Thank you!
 
M

Michel Walsh

The (complex) formulation should work if you enter the date in the fields,
*and* if Sunday is your first day of the week (North America, typically,
maybe some other places too ).


Vanderghast, Access MVP
 

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

Similar Threads


Top