If No Records show $0.00

  • Thread starter shanesullaway via AccessMonster.com
  • Start date
S

shanesullaway via AccessMonster.com

I have a price quote form. On the form is a price quote subform in
continuouse view. As long as there are records in the subform, then I get the
correct total, but if there are no records then I get #error. I would like
for it to show $0.00 if there are no records. The total is being displayed in
an unbound text box and I'm using it's control source. If someone could help
with the proper syntax, I would really appreciate it. I have tried a number
of combinations but I am just not getting the correct results.

TIA,
Shane
 
K

Ken Snell \(MVP\)

Is the textbox on the main form or in the subform?
What is the current ControlSource expression that you have for the textbox?
 
M

Marshall Barton

shanesullaway said:
I have a price quote form. On the form is a price quote subform in
continuouse view. As long as there are records in the subform, then I get the
correct total, but if there are no records then I get #error. I would like
for it to show $0.00 if there are no records. The total is being displayed in
an unbound text box and I'm using it's control source. If someone could help
with the proper syntax, I would really appreciate it. I have tried a number
of combinations but I am just not getting the correct results.


Instead of the text box using something like
=subform.Form.total
use this kind of expression:
=IIf(IsError(subform.Form.total, 0, subform.Form.total)
 
S

shanesullaway via AccessMonster.com

Marshall said:
I have a price quote form. On the form is a price quote subform in
continuouse view. As long as there are records in the subform, then I get the
[quoted text clipped - 3 lines]
with the proper syntax, I would really appreciate it. I have tried a number
of combinations but I am just not getting the correct results.

Instead of the text box using something like
=subform.Form.total
use this kind of expression:
=IIf(IsError(subform.Form.total, 0, subform.Form.total)

Thanks to both of you for taking the time to help. Marshall, that solved my
problem.

Thanks again,
Shane
 

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

Top