Re: Help needed with Date Add function

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



SELECT Plant, [Date], Scale
FROM [Your Table]
WHERE DateSerial(Year([Date]), Month([Date]) + 1 + [Scale],0) <
DateSerial(Year(Date()),Month(Date())+1,0)

In the query grid, you need to add a calculated field
Field: DateSerial(Year([Date]), Month([Date]) + 1 + [Scale],0)
Criteria: < DateSerial(Year(Date()),Month(Date())+1,0)

By the way Date is a bad name for a field. It is the name of the function
Date() and as such can get Access confused as to whether you want the Date()
function (returns today's date) or the field named date. If possible I
would suggest you rename the field ServiceDate or LastServiceDate or some
other variation.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"CP" <CP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:887E0162-F858-4C3C-8DC5-DC3453BF2284@xxxxxxxxxxxxxxxx
I have managed to get myself completey confused please help
I am trying to work out my recall time on listed equipment (when is it
overdue)

Here are my fields
[Plant] - with unique ID
[Date] - date of last service
[Scale] - time in months of next recall (ie 6 or 12)

So lets assume its the 1st Jan, I need something to show anything that is
due/overdue from the end of the calender month (Jan 31st) using the
original
service date+time scale which will also pick up those still not sorted
from
previous months (Dec/Nov etc) - if that makes sense

many thanks


.



Relevant Pages

  • Re: Kaffir Lime Leaves in Pennsylvania?
    ... infestation while my new plant was indoors for the Winter. ... natural enemies to scale sounds grand, ... They are like a dairy herd to ants. ... one last issue for these dwarf citrus trees. ...
    (rec.food.cooking)
  • Re: scale on orchids?!
    ... If you see a couple of scale 'dots', you can swab some alcohol there. ... Maybe rinse with water soon after since it tends to dry out the plant. ... Just soapy water will also suffocate most insects. ... No stress to the orchid; ...
    (rec.gardens.orchids)
  • Re: Multiple Search Criteria with AND/OR???
    ... Plant Type1 ... "or" search criteria without having to specifically identify the criteria in ... Doug Steele, Microsoft Access MVP ... Dim strWhere As String ...
    (microsoft.public.access.formscoding)
  • Re: Kaffir Lime Leaves in Pennsylvania?
    ... infestation while my new plant was indoors for the Winter. ... and it needed to be outdoors to remain hardy. ... natural enemies to scale sounds grand, ... They are like a dairy herd to ants. ...
    (rec.food.cooking)
  • Re: Scale control - methods for indoor control?
    ... For future reference, a thorough spraying with soapy water, then moderate ... the alternate route to plant maintenance. ... At the moment I only have one plant that I can defintiely say has scale, ...
    (rec.gardens.orchids)