Field wont print

L

Linda

I have a field on a report that won't print when the user clicks the print
command button, but that same field will print if you do a print preview and
click print on the toolbar. Any ideas on why this is happening?
 
D

Duane Hookom

What is the difference between this text box and other controls on your
report?
 
L

Linda

There is a nested if statement, but it works fine if you do a print preview
and then print the report. I don't find any other differences.
 
L

Linda

This is the nested IIf statement. To add to the mystery, I have discovered
that all names will print with the exception of those with initials MM and MB.

=IIf([HR Personnel]="RR","Ronald Richard",IIf([HR Personnel]="LG","Linda
Guidry",IIf([HR Personnel]="MM","Michael Martens",IIf([HR
Personnel]="JV","John Vidrine",IIf([HR Personnel]="SG","Shane
Guillory",IIf([HR Personnel]="CB","Chad Burns",IIf([HR
Personnel]="MB","Matthew Broussard"," ")))))))
 
D

Duane Hookom

I would never create or maintain an expression like this.

Have you considered creating a small lookup table with initials as a unique
primary key, FirstName, and LastName? You could then join the talbe into
your report's record source and bind your text box to
=[FirstName] & " " & [LastName]

Seven nested IIf()s is about six too many.

--
Duane Hookom
MS Access MVP
--

Linda said:
This is the nested IIf statement. To add to the mystery, I have
discovered
that all names will print with the exception of those with initials MM and
MB.

=IIf([HR Personnel]="RR","Ronald Richard",IIf([HR Personnel]="LG","Linda
Guidry",IIf([HR Personnel]="MM","Michael Martens",IIf([HR
Personnel]="JV","John Vidrine",IIf([HR Personnel]="SG","Shane
Guillory",IIf([HR Personnel]="CB","Chad Burns",IIf([HR
Personnel]="MB","Matthew Broussard"," ")))))))
--
Linda


Linda said:
There is a nested if statement, but it works fine if you do a print
preview
and then print the report. I don't find any other differences.
 
L

Linda

Thanks! I will try this and see how it works. I appreciate your help and
will let you know how it goes.
--
Linda


Duane Hookom said:
I would never create or maintain an expression like this.

Have you considered creating a small lookup table with initials as a unique
primary key, FirstName, and LastName? You could then join the talbe into
your report's record source and bind your text box to
=[FirstName] & " " & [LastName]

Seven nested IIf()s is about six too many.

--
Duane Hookom
MS Access MVP
--

Linda said:
This is the nested IIf statement. To add to the mystery, I have
discovered
that all names will print with the exception of those with initials MM and
MB.

=IIf([HR Personnel]="RR","Ronald Richard",IIf([HR Personnel]="LG","Linda
Guidry",IIf([HR Personnel]="MM","Michael Martens",IIf([HR
Personnel]="JV","John Vidrine",IIf([HR Personnel]="SG","Shane
Guillory",IIf([HR Personnel]="CB","Chad Burns",IIf([HR
Personnel]="MB","Matthew Broussard"," ")))))))
--
Linda


Linda said:
There is a nested if statement, but it works fine if you do a print
preview
and then print the report. I don't find any other differences.
--
Linda


:

What is the difference between this text box and other controls on your
report?

--
Duane Hookom
MS Access MVP
--

I have a field on a report that won't print when the user clicks the
print
command button, but that same field will print if you do a print
preview
and
click print on the toolbar. Any ideas on why this is happening?
 
Top