Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / May 2008

Tip: Looking for answers? Try searching our database.

30 day old

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lmossolle - 13 May 2008 20:39 GMT
I have a date field "daterecieved" i would like to query for items over 30
days old where a completed field is null. Please assist.

Thanks
Duane Hookom - 13 May 2008 20:47 GMT
Read your question and try to answer it imagining that you don't know what
"30 days old" means or a table name. Is the age determined by datereceived?

Signature

Duane Hookom
Microsoft Access MVP

> I have a date field "daterecieved" i would like to query for items over 30
> days old where a completed field is null. Please assist.
>
> Thanks
lmossolle - 13 May 2008 20:51 GMT
The age is determined by the daterecieved. Table name is SCD, sorry for the
confusion. I was curious if the datediff would work!

> Read your question and try to answer it imagining that you don't know what
> "30 days old" means or a table name. Is the age determined by datereceived?
[quoted text clipped - 3 lines]
> >
> > Thanks
Duane Hookom - 13 May 2008 22:46 GMT
"I was curious if the datediff would work!"
You don't need our permission to try. Come on back if you can't get this to
work for you.

Signature

Duane Hookom
Microsoft Access MVP

> The age is determined by the daterecieved. Table name is SCD, sorry for the
> confusion. I was curious if the datediff would work!
[quoted text clipped - 6 lines]
> > >
> > > Thanks
lmossolle - 14 May 2008 14:42 GMT
I tried this, it did not work...

Sum(IIf(daterecieved < Date() - 30 AND completed Is Null)) AS daysoverdue

> "I was curious if the datediff would work!"
> You don't need our permission to try. Come on back if you can't get this to
[quoted text clipped - 10 lines]
> > > >
> > > > Thanks
Douglas J. Steele - 14 May 2008 22:06 GMT
Not overly surprising that that didn't work.

IIf(daterecieved < Date() - 30 AND completed Is Null)

is invalid. An IIf function is defined as IIf(expr, truepart, falsepart)

You've got the expr part (the expression you want to evaluate), but you
don't have the truepart (the value you want returned if expr is True), not
the falsepart (the value you want returned if expr is False)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I tried this, it did not work...
>
[quoted text clipped - 19 lines]
>> > > >
>> > > > Thanks
Evi - 18 May 2008 14:46 GMT
It looks like you want to count in your report how many records have a
DateReceived which is less than Date()-30 and the Completed field is null

Use

=-Sum(DateRecieved <(Date()-30) AND IsNull(Completed))

(there is a - before the Sum)

If a statement is true, it has a value of -1, otherwise it has a value of 0

Evi

> I tried this, it did not work...
>
[quoted text clipped - 22 lines]
> > > > >
> > > > > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.