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 / November 2008

Tip: Looking for answers? Try searching our database.

Year Rpt with changes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lmv - 04 Nov 2008 14:35 GMT
I have a rpt based on the following query

SELECT DISTINCT tblCity.State, [Name List].ReferDate, [Name List].Studied,
[Name List].Status, *
FROM tblCity INNER JOIN [Name List] ON tblCity.CityID = [Name List].City
ORDER BY tblCity.State;

there are txtboxes in the city area giving totals of all records in db

=Abs(Sum([Status]="Active")) & " ACTIVE"
=Abs(Sum([Status]="Pending")) & " PENDING "

etc...

There are 2 sections
1) ALL RECORDS (seen above)
2) NEW [=Format(Date(),"yyyy")]

I want to have  #2 (parallel row of same data filtered by [ReferDate]>(THIS
YEAR ie. 2008) but I don't want to hard code it to 2008

I can't figure out how to change the control source to do what I want
combining the  =Abs(Sum([Status]="Pending")) & " PENDING " and the date
filter.

It works if I change the whole query to:

SELECT DISTINCT tblCity.State, [Name List].ReferDate, [Name List].Studied,
[Name List].Status, *
FROM tblCity INNER JOIN [Name List] ON tblCity.CityID = [Name List].City
WHERE ((([Name List].ReferDate)>2008))
ORDER BY tblCity.State;

but then I still don't have rows of ALL info plus rows of current year info.

Please help! Thanks!

lmv
Duane Hookom - 04 Nov 2008 15:41 GMT
I think this is what you want.
=Abs(Sum([Status]="Active" AND Year(ReferDate]) = Year(Date()) )) & " ACTIVE"
=Abs(Sum([Status]="Pending" AND Year(ReferDate]) = Year(Date()))) & "
PENDING "

Signature

Duane Hookom
Microsoft Access MVP

> I have a rpt based on the following query
>
[quoted text clipped - 34 lines]
>
> lmv
lmv - 04 Nov 2008 18:13 GMT
...that's the answer! Just needed your info and the [ before referdate to get
to the total.

Thanks Duane!

> I think this is what you want.
> =Abs(Sum([Status]="Active" AND Year(ReferDate]) = Year(Date()) )) & " ACTIVE"
[quoted text clipped - 39 lines]
> >
> > lmv
 
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



©2009 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.