A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count and change name



 
 
Thread Tools Display Modes
  #1  
Old May 15th, 2007, 07:21 PM posted to microsoft.public.access.reports
Dan @BCBS
external usenet poster
 
Posts: 195
Default Count and change name

Could someone please help me add these together into a text box on a report.
After I count the results (a) I need to change the name (b).

(a). This code give me a count per location:
="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Cases","Cases") & ")"

(b).This code groups the location and changes the name:
IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or
[tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or
[tr_gbu]="SW","JACKSONVILLE",Null))

Any advise would be appreciated.


  #2  
Old May 15th, 2007, 07:49 PM posted to microsoft.public.access.reports
Ofer Cohen
external usenet poster
 
Posts: 1,683
Default Count and change name

(a). This code give me a count per location:
="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Cases","Cases") & ")"

The IIf return "Cases" in both case, I assume you want to change it to

="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Case","Cases") & ")"

*****

(b).This code groups the location and changes the name:
IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or
[tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or
[tr_gbu]="SW","JACKSONVILLE",Null))

To make it shorter

=IIf([tr_gbu] In ("SE" ,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW"
,"WC","SW"),"JACKSONVILLE",Null)

**************************

Now, what do you mean abou changing the name?

Do you want to join them together?

="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Case","Cases") & ") " & IIf([tr_gbu] In ("SE"
,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW"
,"WC","SW"),"JACKSONVILLE",Null)



--
Good Luck
BS"D


"Dan @BCBS" wrote:

Could someone please help me add these together into a text box on a report.
After I count the results (a) I need to change the name (b).

(a). This code give me a count per location:
="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Cases","Cases") & ")"

(b).This code groups the location and changes the name:
IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or
[tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or
[tr_gbu]="SW","JACKSONVILLE",Null))

Any advise would be appreciated.


  #3  
Old May 15th, 2007, 08:25 PM posted to microsoft.public.access.reports
Dan @BCBS
external usenet poster
 
Posts: 195
Default Count and change name

Fantastic - Thank you.......

"Ofer Cohen" wrote:

(a). This code give me a count per location:
="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Cases","Cases") & ")"

The IIf return "Cases" in both case, I assume you want to change it to

="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Case","Cases") & ")"

*****

(b).This code groups the location and changes the name:
IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or
[tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or
[tr_gbu]="SW","JACKSONVILLE",Null))

To make it shorter

=IIf([tr_gbu] In ("SE" ,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW"
,"WC","SW"),"JACKSONVILLE",Null)

**************************

Now, what do you mean abou changing the name?

Do you want to join them together?

="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Case","Cases") & ") " & IIf([tr_gbu] In ("SE"
,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW"
,"WC","SW"),"JACKSONVILLE",Null)



--
Good Luck
BS"D


"Dan @BCBS" wrote:

Could someone please help me add these together into a text box on a report.
After I count the results (a) I need to change the name (b).

(a). This code give me a count per location:
="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " &
IIf(Count(*)=1,"Cases","Cases") & ")"

(b).This code groups the location and changes the name:
IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or
[tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or
[tr_gbu]="SW","JACKSONVILLE",Null))

Any advise would be appreciated.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.