Empty Subform is a crazy !!

  • Thread starter Thread starter MrCC via AccessMonster.com
  • Start date Start date
M

MrCC via AccessMonster.com

dear all

now my problem is so simple so mad also :)

i have a form consist of 4 subforms each has a textbox called subtotal
(=sum([totcost])
and i have a textbox in the main form which is the grand totals for the 4
subtotals

now the problem if one of the subforms has no records its subtotal box be
came clear without any value ( its value not null nor empty i test it by
isnull & isempty) and the result that the grand total give error not even the
totals of the other subtotals ???


any tips???

thanks all

bye
 
Duplicate the SubTotal textboxes on your main form with invisible textboxes.
Set the ControlSource of each invisible textbox to =Iff(IsError(SubForm1.Form.
SubTotal),0,SubForm1.Form.SubTotal) pointing to a different SubTotal in each
textbos. Then total your invisible texboxes instead.
dear all

now my problem is so simple so mad also :)

i have a form consist of 4 subforms each has a textbox called subtotal
(=sum([totcost])
and i have a textbox in the main form which is the grand totals for the 4
subtotals

now the problem if one of the subforms has no records its subtotal box be
came clear without any value ( its value not null nor empty i test it by
isnull & isempty) and the result that the grand total give error not even the
totals of the other subtotals ???

any tips???

thanks all

bye
 
came clear without any value ( its value not null nor empty i test it by
isnull & isempty) and the result that the grand total give error not even the
totals of the other subtotals ???

Try testing with IsNumeric()

Steve
 
Back
Top