Advance feature of Query

  • Thread starter Thread starter rena
  • Start date Start date
R

rena

Hi Experts,
I would like to know if there are any ways to solve my problem.

i.e.
I have an query with 5 fields, A, B, C, D, E

I need to create a Field F which will display "N/A" if the value of field E
is 0, else copy the value from field E.

similiarly, I need to create another Field G which will display "N/A" if
both field A and field B is 0, else copy the value from field D.


Thanks a lot
Rena
 
Piece of cake.

I'm going to assume that you've got the query builder open, with the
existing 5 fields already dragged into the grid.

In the empty cell to the right of field E, type the following:

F: IIf([E] = 0, "N/A", [E])

In the empty cell to the right of that, type the following:

G: IIf([A] = 0 And = 0, "N/A", [D])
 
Hehe Thanks a lot MVP ^_^

Douglas J. Steele said:
Piece of cake.

I'm going to assume that you've got the query builder open, with the
existing 5 fields already dragged into the grid.

In the empty cell to the right of field E, type the following:

F: IIf([E] = 0, "N/A", [E])

In the empty cell to the right of that, type the following:

G: IIf([A] = 0 And = 0, "N/A", [D])

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



rena said:
Hi Experts,
I would like to know if there are any ways to solve my problem.

i.e.
I have an query with 5 fields, A, B, C, D, E

I need to create a Field F which will display "N/A" if the value of
field
E
is 0, else copy the value from field E.

similiarly, I need to create another Field G which will display "N/A" if
both field A and field B is 0, else copy the value from field D.


Thanks a lot
Rena
 
Back
Top