subform to main form formula #Error

R

Revned

hello,

i have this as my records source to one of my text box in my main form.
=[tblCharges subform].Form.sumchargeamt

i set the Child Link :InclusiveInvoiceNo
Master Link fields : InvoiceNumber
it works will, when i scroll on my combo it filters base on InvoiceNumber

the problem is when the i choose a certain inovice number with no records
stored from my subform it gives this result #Error on my text boxes.

is there anyway to handle this?i just want 0 to be displayed in this text
box when no records stored for particular inoicenumber

thanks for any help
 
J

June7 via AccessMonster.com

Check out IsError function and HasData property. Is 'sumchargeamt' value
resulting from query expression? Might have to modify this expression to show
the '0' if no records to be summed.
hello,

i have this as my records source to one of my text box in my main form.
=[tblCharges subform].Form.sumchargeamt

i set the Child Link :InclusiveInvoiceNo
Master Link fields : InvoiceNumber
it works will, when i scroll on my combo it filters base on InvoiceNumber

the problem is when the i choose a certain inovice number with no records
stored from my subform it gives this result #Error on my text boxes.

is there anyway to handle this?i just want 0 to be displayed in this text
box when no records stored for particular inoicenumber

thanks for any help
 
R

Revned

thank you very much Jeanette Cunningham and June7
I really appreciate your help and kindness

Jeanette Cunningham said:
Hi Revned,
use the function IfFormHasData from this website.

http://allenbrowne.com/RecordCountError.html



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



Revned said:
hello,

i have this as my records source to one of my text box in my main form.
=[tblCharges subform].Form.sumchargeamt

i set the Child Link :InclusiveInvoiceNo
Master Link fields : InvoiceNumber
it works will, when i scroll on my combo it filters base on InvoiceNumber

the problem is when the i choose a certain inovice number with no records
stored from my subform it gives this result #Error on my text boxes.

is there anyway to handle this?i just want 0 to be displayed in this text
box when no records stored for particular inoicenumber

thanks for any help
 

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