Help with settign the value of textbox to null

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

Guest

Hi

Have Access 2003 dev.
I have a report with two text boxes where I want to change the textbox value
to "null" if it shows a sertain value (="XX")

anyone who can help me with this

Thank you in advance

Mattias
 
Mattias said:
Hi

Have Access 2003 dev.
I have a report with two text boxes where I want to change the
textbox value to "null" if it shows a sertain value (="XX")

anyone who can help me with this

=IIf([FieldName] = "XX", Null, [FieldName])
 
Hi Rick

Thanks for your reply

Just want to know if your reply is the same if they are bound textfields?
And shall i put the code on report open or format?
Rick Brandt said:
Mattias said:
Hi

Have Access 2003 dev.
I have a report with two text boxes where I want to change the
textbox value to "null" if it shows a sertain value (="XX")

anyone who can help me with this

=IIf([FieldName] = "XX", Null, [FieldName])
 
Mattias said:
Hi Rick

Thanks for your reply

Just want to know if your reply is the same if they are bound textfields?
And shall i put the code on report open or format?
"Rick Brandt" wrote:

What I wrote would go in the ControlSource of the TextBox *instead of* the field
name that would ordinarily be there.
 
Hi

Getting a error here "The control has reference to it self"

Mattias

=IIf([anställda.efternamn]="Okänd";Null;[anställda.efternamn])
 
First when I tried to rename the control it renamd the fieleldname in the
data source at the same time...??

But I found a way and it is working now!!

Thank you

Mattias

Mattias said:
Hi

Getting a error here "The control has reference to it self"

Mattias

=IIf([anställda.efternamn]="Okänd";Null;[anställda.efternamn])

Rick Brandt said:
What I wrote would go in the ControlSource of the TextBox *instead of* the field
name that would ordinarily be there.
 
Back
Top