hansretallick
Technical User
I have a form which uses data from several subforms to populate a table. The subforms are based on several queries and other tables, but they all have one thing in common. When there is no data, the text boxes in the main form which look at the subforms display #Error. I have tried Nz and IIf IsNull in both the subform text boxes, and the main form, but still have the error. A typical text box in a subform is =Nz([Rent],0), and a sum text box based on this shows blank when no records. This is based on sql
SELECT qryRentPaid.LandlordID, qryRentPaid.RentAmount AS Rent, qryRentPaid.TenantFindOnly
FROM qryRentPaid
WHERE (((qryRentPaid.TenantFindOnly)=False));
On the main form a text box =frmSubRentPaid.Form!RentSum looks up the data in the subform, and this one shows #Error when no data is present. I have also tried this box with Nz and IIf IsNull, but to no avail. When data is present, everything works perfectly.
Please can someone help.
SELECT qryRentPaid.LandlordID, qryRentPaid.RentAmount AS Rent, qryRentPaid.TenantFindOnly
FROM qryRentPaid
WHERE (((qryRentPaid.TenantFindOnly)=False));
On the main form a text box =frmSubRentPaid.Form!RentSum looks up the data in the subform, and this one shows #Error when no data is present. I have also tried this box with Nz and IIf IsNull, but to no avail. When data is present, everything works perfectly.
Please can someone help.