not display error

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I have a calculation on a report based on the total price minus payments. If
no payments have been made, the field shows an error (#Error).

I would like to write some expression that will show the total price if
there are no payments made, and the total price minus the sum of the
payments otherwise.

I have a statement that works
iif([SumOfpmtAmt] is null,"",[bidPrice]-[SumOfpmtAmt])
Instead of showing the blank space, or the #error, I would like to show the
bid price. I tried:
iif([SumOfpmtAmt] is error, [bidPrice],[bidPrice][bidPrice]-[SumOfpmtAmt]) -
but Access doesn't like it

any ideas
 
As I said in reply to your earlier post assigning the value to the control in
the Print event procedure of the section containing the SumOfpmtAmt control
would enable you to test for Null and conditionally assign one or other of
the values:

If Not IsNull(Me.SumOfpmtAmt) Then
Me.YourTextBox = Me.bidPrice – Me.SumOfpmtAmt
Else
Me.YourTextBox = Me.BidPrice
End If

where YourTextBox is the name of the control in question. Its ControlSource
property should be left blank.

Ken Sheridan
Stafford, England
 
Thank You, sorry I didn't see the original reply, but it works now, thanks.

Ken Sheridan said:
As I said in reply to your earlier post assigning the value to the control in
the Print event procedure of the section containing the SumOfpmtAmt control
would enable you to test for Null and conditionally assign one or other of
the values:

If Not IsNull(Me.SumOfpmtAmt) Then
Me.YourTextBox = Me.bidPrice – Me.SumOfpmtAmt
Else
Me.YourTextBox = Me.BidPrice
End If

where YourTextBox is the name of the control in question. Its ControlSource
property should be left blank.

Ken Sheridan
Stafford, England

Brian said:
I have a calculation on a report based on the total price minus payments. If
no payments have been made, the field shows an error (#Error).

I would like to write some expression that will show the total price if
there are no payments made, and the total price minus the sum of the
payments otherwise.

I have a statement that works
iif([SumOfpmtAmt] is null,"",[bidPrice]-[SumOfpmtAmt])
Instead of showing the blank space, or the #error, I would like to show the
bid price. I tried:
iif([SumOfpmtAmt] is error, [bidPrice],[bidPrice][bidPrice]-[SumOfpmtAmt]) -
but Access doesn't like it

any ideas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

iif is error 1
Passing variables? 2
Access Query problem 1
duplicate records in a query/report 5
Condition on the value selected from combox 0
Aggregate Function Error 0
Not quite sure what to do 4
Need help creating subform 1

Back
Top