WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Year Rpt with changes

 
   Home -> Office other -> Reports RSS
Next:  Count function in a report  
Author Message
lmv

External


Since: Oct 28, 2005
Posts: 58



(Msg. 1) Posted: Tue Nov 04, 2008 6:35 am
Post subject: Year Rpt with changes
Archived from groups: microsoft>public>access>reports (more info?)

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
Back to top
Login to vote
Duane Hookom

External


Since: Feb 07, 2005
Posts: 2415



(Msg. 2) Posted: Tue Nov 04, 2008 7:41 am
Post subject: RE: Year Rpt with changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 "

--
Duane Hookom
Microsoft Access MVP


"lmv" wrote:

> 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
>
Back to top
Login to vote
lmv

External


Since: Oct 28, 2005
Posts: 58



(Msg. 3) Posted: Tue Nov 04, 2008 10:13 am
Post subject: RE: Year Rpt with changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

....that's the answer! Just needed your info and the [ before referdate to get
to the total.

Thanks Duane!

"Duane Hookom" wrote:

> 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 "
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "lmv" wrote:
>
> > 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
> >
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Reports All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support