#error in form footer sum 
November 13th, 2005, 02:04 PM
| | | #error in form footer sum
Hi all,
I'm getting an error when i put a sum in the form footer of a
continuous form.
I have followed the NWind database exactly (i hope).
The conituous form uses a single table name as its record source.
One of the fields is a number field (format - double). That field is
called SysAffValueAmt.
In the form footer is a text box with the control source:
=Sum([SysAffValueAmt])
I have tried every other permutation of possible values to get this to
work but no joy. Anyone know what i'm doing wrong?
Thanks,
Rob. | 
November 13th, 2005, 02:04 PM
| | | Re: #error in form footer sum
"dkintheuk" <rmcgregor@firenet.uk.com> wrote in message
news:1128415809.001376.158730@g44g2000cwa.googlegr oups.com...[color=blue]
> Hi all,
>
> I'm getting an error when i put a sum in the form footer of a
> continuous form.
>
> I have followed the NWind database exactly (i hope).
>
> The conituous form uses a single table name as its record source.
>
> One of the fields is a number field (format - double). That field is
> called SysAffValueAmt.
>
> In the form footer is a text box with the control source:
>
> =Sum([SysAffValueAmt])
>
> I have tried every other permutation of possible values to get this to
> work but no joy. Anyone know what i'm doing wrong?
>
> Thanks,
>
> Rob.[/color]
Try naming the textboxes differently to the fields, eg
txtSysAffValueAmt is bound to SysAffValueAmt
txtSysAffValueAmtTotal is bound to =Sum([SysAffValueAmt])
Allowing Access to give the controls the same names as the fields to which
they are bound, can cause it to get its knickers in a twist in certain
situations. | 
November 13th, 2005, 02:04 PM
| | | Re: #error in form footer sum
First, make sure that SysAffValueAmt is a field from the rform's ecord
source and not a calculated control on the form.
Secondly, if you a using an ADP then make sure then make sure that the
record source of the form is a saved view and not an SQL statement.
This scenario has given me grieve in the past.
Good luck.
Julie | 
November 13th, 2005, 02:04 PM
| | | Re: #error in form footer sum
Hmmm good plan in principle.
I changed the name of the SysAffValueAmt box from that to
txtSysAffValueAmt as menioned.
The Total box AUTOMATICALLY changed to be =Sum([txtSysAffValueAmt]) -
wierd in itself and still gave the error.
I then manually changed the sum to be as described in your post.
It still gives the same error... Damn it! this is driving me mad...
If i just make the texbox in the footer have the same field value, it
correctly shows the field value for the record i have selected in the
contiuous form but as soon as i wrap it in sum() it fails.
Any other good ideas? | 
November 13th, 2005, 02:04 PM
| | | Re: #error in form footer sum
Good call jv, unfortunately the the field a field in the forms record
source (as the record source is just a table with that field included).
Also, not using ADP so no chance of that screwing things up...
Argh... just recreated a brand new form, just for this table exactly as
before and now it works... sorry for bothering you all. Not sure what
was different...
Rob. | 
November 13th, 2005, 02:04 PM
| | | Re: #error in form footer sum
"dkintheuk" <rmcgregor@firenet.uk.com> wrote in message
news:1128434645.495671.203880@g44g2000cwa.googlegr oups.com...[color=blue]
> Hmmm good plan in principle.
>
> I changed the name of the SysAffValueAmt box from that to
> txtSysAffValueAmt as menioned.
>
> The Total box AUTOMATICALLY changed to be =Sum([txtSysAffValueAmt]) -
> wierd in itself and still gave the error.
>
> I then manually changed the sum to be as described in your post.
>
> It still gives the same error... Damn it! this is driving me mad...
>
> If i just make the texbox in the footer have the same field value, it
> correctly shows the field value for the record i have selected in the
> contiuous form but as soon as i wrap it in sum() it fails.
>
> Any other good ideas?[/color]
I think the auto-correcting that you saw is down to a setting
Tools>Options>General Tab - Name Autocorrect. You could switch this off.
So the two textboxes and the field all have different names and it is still
playing up? Obviously, what you are attempting is pretty straight-forward
stuff, so I'm trying to think of a simple reason it might fail. What about
the field is a text field and one of the entries can't be converted to a
number?
Perhaps as a double check, create a new table tblAmount with 2 fields ID and
Amount. Create a continuous form with textboxes txtID, txtAmount and a
textbox in the footer txtTotal which =Sum([Amount]). Does this tiny sample
not work? | 
November 13th, 2005, 02:04 PM
| | | Re: #error in form footer sum
thanks brian - as you can see i sorted it by starting again... i've
turned off the autocorrect function as it is not helping much here and
i never used to have it in the past...
so it works but i can't for the life of me see why it didn't - i shall
update the NG if i ever find out why.
Rob. | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,662 network members.
|