IF Statement

L

Linda

Hi,

I am trying to use an If Then statement for one of my fields in the subform.
I would to only show in the field an M if the stock code is associated with
this flag (M). Right now the tables have M or B associated with the stock
code and both codes show in the text box, i only want M to show up.

Thanks
Linda
 
R

RuralGuy

Set your control source for the textbox to:
=IIf([YourFieldName] = "M",[YourFieldName],"")

Using YourFieldName of course.

I guess you could also do:

=IIf([YourFieldName] = "M","M","")

Hi,

I am trying to use an If Then statement for one of my fields in the subform.
I would to only show in the field an M if the stock code is associated with
this flag (M). Right now the tables have M or B associated with the stock
code and both codes show in the text box, i only want M to show up.

Thanks
Linda
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
L

Linda

Thanks for your reply but i figured it out. Your help is much appreciated!

RuralGuy said:
Set your control source for the textbox to:
=IIf([YourFieldName] = "M",[YourFieldName],"")

Using YourFieldName of course.

I guess you could also do:

=IIf([YourFieldName] = "M","M","")

Hi,

I am trying to use an If Then statement for one of my fields in the subform.
I would to only show in the field an M if the stock code is associated with
this flag (M). Right now the tables have M or B associated with the stock
code and both codes show in the text box, i only want M to show up.

Thanks
Linda
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Top