Add a Dash - into a field if Null? How

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several rows in my query (report) that will have data if the value =
True based off a check box. However if the value is False I would like it to
put a "dash -" in all the text boxes assiciated with that otion box value.

How do I do this or can you steer me in the right direction?
 
Try

IIf([CheckBoxName]=True, [FieldName],"-")

Also, if you want to replace zero with dash, then with the use of Nz

Nz([FieldName],"-")
 
Thank you very much!

Ofer Cohen said:
Try

IIf([CheckBoxName]=True, [FieldName],"-")

Also, if you want to replace zero with dash, then with the use of Nz

Nz([FieldName],"-")

--
Good Luck
BS"D


TKM said:
I have several rows in my query (report) that will have data if the value =
True based off a check box. However if the value is False I would like it to
put a "dash -" in all the text boxes assiciated with that otion box value.

How do I do this or can you steer me in the right direction?
 
Ofer,

For some reason this is not working. I tried putting it in the creteria of
both the chek box and also tried the fieldname and it it does not work. I
also tried with the NZ and nothing. Any ideas?

Thanks again

Ofer Cohen said:
Try

IIf([CheckBoxName]=True, [FieldName],"-")

--
Good Luck
BS"D


TKM said:
I have several rows in my query (report) that will have data if the value =
True based off a check box. However if the value is False I would like it to
put a "dash -" in all the text boxes assiciated with that otion box value.

How do I do this or can you steer me in the right direction?
 
It is not criteria but is used in the design view query grid in leiu of the
[FieldName] but preceed it with an alias and colon.

NewFieldAlias: IIf([CheckBoxName]=True, [FieldName],"-")

--
KARL DEWEY
Build a little - Test a little


TKM said:
Ofer,

For some reason this is not working. I tried putting it in the creteria of
both the chek box and also tried the fieldname and it it does not work. I
also tried with the NZ and nothing. Any ideas?

Thanks again

Ofer Cohen said:
Try

IIf([CheckBoxName]=True, [FieldName],"-")

--
Good Luck
BS"D


TKM said:
I have several rows in my query (report) that will have data if the value =
True based off a check box. However if the value is False I would like it to
put a "dash -" in all the text boxes assiciated with that otion box value.

How do I do this or can you steer me in the right direction?
 
Back
Top