I've done this often before but this time ...

L

Len B

My subform has totals at the end - text boxes in the form footer.
Control Source of one is =Sum([Qty]) and the others are similar.

All show #Error even though the data lists properly in the Detail section.

Why? What could be different from the other times where this has worked
perfectly? I have checked spellings.
 
D

Dirk Goldgar

Len B said:
My subform has totals at the end - text boxes in the form footer.
Control Source of one is =Sum([Qty]) and the others are similar.

All show #Error even though the data lists properly in the Detail
section.

Why? What could be different from the other times where this has
worked perfectly? I have checked spellings.

Make sure:

(a) the field being summed (e.g. "Qty") is actually a field in the
form's recordsource, and that it is among the fields selected by the
recordsource query. Maybe your Sum expression used the name of a
control that is not the name of the field it's bound to.

(b) the name of the text box is not the same as the name of any field in
the form's recordsource.
 
L

Len B

My subform has totals at the end - text boxes in the form footer.
Control Source of one is =Sum([Qty]) and the others are similar.

All show #Error even though the data lists properly in the Detail
section.

Why? What could be different from the other times where this has
worked perfectly? I have checked spellings.
======================================
Make sure:

(a) the field being summed (e.g. "Qty") is actually a field in the
form's recordsource, and that it is among the fields selected by the
recordsource query. Maybe your Sum expression used the name of a
control that is not the name of the field it's bound to.

(b) the name of the text box is not the same as the name of any field in
the form's recordsource.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

==============================
Checked all that Dirk. Its sort of what I meant when I said I checked
spellings.
Qty is a valid (integer) field in the table RetailDtl. The subform has this
table as its RecordSource. The field selector does include Qty as expected
and its a bit hard to spell that wrong without noticing but I did explicitly
check.

I have variously named the control both [Qty] and [txtQty] and modified the
footer formula accordingly. I have even added a new text box control to the
footer and used =Sum([Qty]) as Control Source on that. Still #Error just the
same.

The name of the control containing the sum formula is [txtSumQty] which does
not appear in the field selector (nor the table, of course). I have set its
format to General Number, 0 places and Fixed, 0 places. No changes. I have
changed other properties similarly but now I have no straws left to grasp.

I might even have to start new form from scratch. It is driving me nuts.
Normally it works first go.

Thanks for your help Dirk.

Len
 
D

Dirk Goldgar

Len B said:
Checked all that Dirk. Its sort of what I meant when I said I checked
spellings.
Qty is a valid (integer) field in the table RetailDtl. The subform
has this table as its RecordSource. The field selector does include
Qty as expected and its a bit hard to spell that wrong without
noticing but I did explicitly check.

I have variously named the control both [Qty] and [txtQty] and
modified the footer formula accordingly. I have even added a new text
box control to the footer and used =Sum([Qty]) as Control Source on
that. Still #Error just the same.

The name of the control containing the sum formula is [txtSumQty]
which does not appear in the field selector (nor the table, of
course). I have set its format to General Number, 0 places and Fixed,
0 places. No changes. I have changed other properties similarly but
now I have no straws left to grasp.

I might even have to start new form from scratch. It is driving me
nuts. Normally it works first go.

Hmm. Check Tools->Options..., General, to see if Name AutoCorrect is
enabled. If it is, try turning it off.
 
L

Len B

Sorry Dirk,
I gave up. I couldn't waste more time on it so I did it over and it worked
fine first go. I still do not know what was wrong. I came back to it later
and used the documenter to compare the two in detail but found no
significant differences. I have kept the word document showing the
properties if you want to look at it.

BTW Name AutoCorrect was disabled.

Thanks again for your help
Len

Dirk Goldgar said:
Len B said:
Checked all that Dirk. Its sort of what I meant when I said I checked
spellings.
Qty is a valid (integer) field in the table RetailDtl. The subform
has this table as its RecordSource. The field selector does include
Qty as expected and its a bit hard to spell that wrong without
noticing but I did explicitly check.

I have variously named the control both [Qty] and [txtQty] and
modified the footer formula accordingly. I have even added a new text
box control to the footer and used =Sum([Qty]) as Control Source on
that. Still #Error just the same.

The name of the control containing the sum formula is [txtSumQty]
which does not appear in the field selector (nor the table, of
course). I have set its format to General Number, 0 places and Fixed,
0 places. No changes. I have changed other properties similarly but
now I have no straws left to grasp.

I might even have to start new form from scratch. It is driving me
nuts. Normally it works first go.

Hmm. Check Tools->Options..., General, to see if Name AutoCorrect is
enabled. If it is, try turning it off.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
D

Dirk Goldgar

Len B said:
Sorry Dirk,
I gave up. I couldn't waste more time on it so I did it over and it
worked fine first go. I still do not know what was wrong. I came back
to it later and used the documenter to compare the two in detail but
found no significant differences. I have kept the word document
showing the properties if you want to look at it.

I reckon if you've got it working, it's not worth pursuing further.
Thanks for posting back.
 
Top