A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

# Error on Forms and reports



 
 
Thread Tools Display Modes
  #1  
Old February 10th, 2005, 02:30 PM
JP Bless
external usenet poster
 
Posts: n/a
Default # Error on Forms and reports

Hi all,

I have textboxes in forms and reports that get values (totals) from subforms
and subreports. When there is no data in the subreports the textboxes
display # Error. How do I make the textboxes display 0.00 when there is no
data in the subforms and subreports. I have tried the following... make the
textboxes default value to 0, Val(thesubReportTextBox) and nothing worked. I
do not want to see #Error on either the the forms or reports. Please help.
Thanks in advance.


  #2  
Old February 10th, 2005, 03:20 PM
[MVP] S.Clark
external usenet poster
 
Posts: n/a
Default

Use the Nz() function in the queries that populate the report.

e.g. Nz([fieldname], 0)

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

"JP Bless" wrote in message
...
Hi all,

I have textboxes in forms and reports that get values (totals) from
subforms
and subreports. When there is no data in the subreports the textboxes
display # Error. How do I make the textboxes display 0.00 when there is no
data in the subforms and subreports. I have tried the following... make
the
textboxes default value to 0, Val(thesubReportTextBox) and nothing worked.
I
do not want to see #Error on either the the forms or reports. Please help.
Thanks in advance.




  #3  
Old February 10th, 2005, 04:02 PM
JP Bless
external usenet poster
 
Posts: n/a
Default

Query? I am sorry... I have a form and subform (also a report and
subReport). The form is bound to a table. But I have a field that gets the
value of a textbox in the subform. I set the Recordsource property of the
textbox as
=[Receipts subform].Form!txtPaid

Where "Receipts subform" is the subform
And "txtPaid" is the textbox in Receipts subform
Works fine if txtPaid is not null but returns "# Error" if null
How do I modify recordsource property to be 0 if null

I have tried
=NZ([Receipts subform].Form!txtPaid,0)
and Iif(Isnull([Receipts subform].Form!txtPaid),0,[Receipts
subform].Form!txtPaid)
Doesn't work. Please help.


"[MVP] S.Clark" wrote in message
...
Use the Nz() function in the queries that populate the report.

e.g. Nz([fieldname], 0)

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

"JP Bless" wrote in message
...
Hi all,

I have textboxes in forms and reports that get values (totals) from
subforms
and subreports. When there is no data in the subreports the textboxes
display # Error. How do I make the textboxes display 0.00 when there is

no
data in the subforms and subreports. I have tried the following... make
the
textboxes default value to 0, Val(thesubReportTextBox) and nothing

worked.
I
do not want to see #Error on either the the forms or reports. Please

help.
Thanks in advance.






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
forms and reports size problem when file is transfered to a laptop Allan from Melbourne General Discussion 4 January 31st, 2005 07:47 AM
Creation & Modification Dates of Forms, Reports & Macros changed lenderb122 New Users 1 July 14th, 2004 01:19 AM
Forms into Reports Paula Setting Up & Running Reports 3 June 24th, 2004 03:45 PM


All times are GMT +1. The time now is 04:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.