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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

several report fields from one table field



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 07:56 PM
Steve
external usenet poster
 
Posts: n/a
Default several report fields from one table field

I have two fields [number] which is a contact number and
[type] which is Cell, Home... I have a report where I
want to list each person's home number and cell number
but I want everything on one line not grouped by
employee, thus I need two fields. Can I write a two
queries similar to these BRIO queries which will create
the two fields for my report?

homephoneCASE WHEN [type]= "home" THEN [number] ELSE ""
END)

cellphone: (CASE WHEN [type]= "cell" THEN [number]ELSE ""
END)

Thanks for the help!


  #2  
Old May 25th, 2004, 06:07 AM
John Vinson
external usenet poster
 
Posts: n/a
Default several report fields from one table field

On Mon, 24 May 2004 11:56:05 -0700, "Steve"
wrote:

I have two fields [number] which is a contact number and
[type] which is Cell, Home... I have a report where I
want to list each person's home number and cell number
but I want everything on one line not grouped by
employee, thus I need two fields. Can I write a two
queries similar to these BRIO queries which will create
the two fields for my report?

homephoneCASE WHEN [type]= "home" THEN [number] ELSE ""
END)

cellphone: (CASE WHEN [type]= "cell" THEN [number]ELSE ""
END)

Thanks for the help!


The Access analog would use the IIF() function. In a Query design grid
vacant field cell type

Homephone: IIF([Type] = "home", [Number], "")

etc.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #3  
Old May 25th, 2004, 11:49 AM
external usenet poster
 
Posts: n/a
Default several report fields from one table field

Thanks John, Is there a method that does not use the IIF
function? Everything I read says to keep away from it
since it is so slow. My report will take 7 of these type
of fields so maybe speed will not be a factor. I'll try
it out immediately.

I notice you are a major contributor to the forum and I
appreciate your generosity.
 




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 10:19 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.