several report fields from one table field

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

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?

homephone:(CASE WHEN [type]= "home" THEN [number] ELSE ""
END)

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

Thanks for the help!
 
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?

homephone:(CASE 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.
 
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.
 
Back
Top