Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / December 2005

Tip: Looking for answers? Try searching our database.

#Error in text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Memphis - 02 Dec 2005 15:44 GMT
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
Allen Browne - 02 Dec 2005 16:08 GMT
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().

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> 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.
[quoted text clipped - 5 lines]
>
> Thanks
Memphis - 02 Dec 2005 16:35 GMT
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

> When there is no data to print, referring to the text box causes a
> calculation error as you found.
[quoted text clipped - 10 lines]
> >
> > Thanks
Allen Browne - 02 Dec 2005 16:43 GMT
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]))

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Thanks for your reply Mr. Browne,
> I am still confused, I tried typing =IIf(isError( )Trim([CLFirst] & "  " &
[quoted text clipped - 19 lines]
>> >
>> > I would like to get rid of the # Error but I don't know how.
Memphis - 02 Dec 2005 19:56 GMT
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

> You do not have anything inside the IsError() brackets for it to test:
>
[quoted text clipped - 25 lines]
> >> >
> >> > I would like to get rid of the # Error but I don't know how.
Allen Browne - 03 Dec 2005 02:53 GMT
Yes, testing the HasData property of the report would also be a good
solution.

Great.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> 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)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.