#Error in text box

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

Guest

When I want to print a blank copy of a Report so that I may fill it out
manually, I get a #Error on the text box that was expecting a value.

This is the procedure I have for this text box "Text55":
=Trim([CLFirst] & " " & [CLInitial] & " " & [CLLast])

I would like to get rid of the # Error but I don't know how.

Thanks
 
When there is no data to print, referring to the text box causes a
calculation error as you found.

You can avoid that with by testing for IsError(), inside IIf().
 
Thanks for your reply Mr. Browne,
I am still confused, I tried typing =IIf(isError( )Trim([CLFirst] & " " &
[CLInitial] & " " & [CLLast]) and a couple of different ways but I get an
alert that I am not doing something right and resets the formula back to
where it was.

Could you shed some more light on this?

Thanks
Dax

Allen Browne said:
When there is no data to print, referring to the text box causes a
calculation error as you found.

You can avoid that with by testing for IsError(), inside IIf().

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Memphis said:
When I want to print a blank copy of a Report so that I may fill it out
manually, I get a #Error on the text box that was expecting a value.

This is the procedure I have for this text box "Text55":
=Trim([CLFirst] & " " & [CLInitial] & " " & [CLLast])

I would like to get rid of the # Error but I don't know how.

Thanks
 
You do not have anything inside the IsError() brackets for it to test:

Try something like this:
=IIf(IsError([CLFirst] & " " & [CLInitial] & " " & [CLLast]), Null,
Trim([CLFirst] & " " & [CLInitial] & " " & [CLLast]))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Memphis said:
Thanks for your reply Mr. Browne,
I am still confused, I tried typing =IIf(isError( )Trim([CLFirst] & " " &
[CLInitial] & " " & [CLLast]) and a couple of different ways but I get an
alert that I am not doing something right and resets the formula back to
where it was.

Could you shed some more light on this?

Thanks
Dax

Allen Browne said:
When there is no data to print, referring to the text box causes a
calculation error as you found.

You can avoid that with by testing for IsError(), inside IIf().


Memphis said:
When I want to print a blank copy of a Report so that I may fill it out
manually, I get a #Error on the text box that was expecting a value.

This is the procedure I have for this text box "Text55":
=Trim([CLFirst] & " " & [CLInitial] & " " & [CLLast])

I would like to get rid of the # Error but I don't know how.
 
It took a while to figure this out but after reading your reply and some
other replies here I was able to piece this together and it works out:
=IIf([HasData],Trim([CLFirst] & " " & [CLInitial] & " " & [CLLast]),Null)

Thank you for your replies

Dax

Allen Browne said:
You do not have anything inside the IsError() brackets for it to test:

Try something like this:
=IIf(IsError([CLFirst] & " " & [CLInitial] & " " & [CLLast]), Null,
Trim([CLFirst] & " " & [CLInitial] & " " & [CLLast]))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Memphis said:
Thanks for your reply Mr. Browne,
I am still confused, I tried typing =IIf(isError( )Trim([CLFirst] & " " &
[CLInitial] & " " & [CLLast]) and a couple of different ways but I get an
alert that I am not doing something right and resets the formula back to
where it was.

Could you shed some more light on this?

Thanks
Dax

Allen Browne said:
When there is no data to print, referring to the text box causes a
calculation error as you found.

You can avoid that with by testing for IsError(), inside IIf().


When I want to print a blank copy of a Report so that I may fill it out
manually, I get a #Error on the text box that was expecting a value.

This is the procedure I have for this text box "Text55":
=Trim([CLFirst] & " " & [CLInitial] & " " & [CLLast])

I would like to get rid of the # Error but I don't know how.
 
Yes, testing the HasData property of the report would also be a good
solution.

Great.
 
Back
Top