[AccessD] Form Totals and SQL Recordsets

David Emerson newsgrps at dalyn.co.nz
Wed Apr 11 22:43:45 CDT 2018


Yep - that's what I ended up with.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of RockySmolin at bchacc.com
Sent: Thursday, 12 April 2018 3:24 p.m.
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Form Totals and SQL Recordsets


Well this wouldn�t solve a he problem but work around it - replace the
sum with a query that does the same as thing?

-------- Original Message --------
Subject: Re: [AccessD] Form Totals and SQL Recordsets
From: "David Emerson" <newsgrps at dalyn.co.nz>
Date: Wed, April 11, 2018 7:59 pm
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>

Hi Rocky,

Have tried that already but no joy.

Regards

David

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
RockySmolin at bchacc.com
Sent: Thursday, 12 April 2018 12:38 p.m.
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Form Totals and SQL Recordsets


I have always done something horrible in my bound forms but fortunately
have never gotten bit by it ? I name the control the same as the
control source. I know it?s a sin I should atone for and someday I
will. Meanwhile try that and see if it solves the problem.

i got into this bad habit because sometimes es you need to reference 5e
control name and sometimes the record source.

R
-------- Original Message --------
Subject: [AccessD] Form Totals and SQL Recordsets
From: "David Emerson" <newsgrps at dalyn.co.nz>
Date: Wed, April 11, 2018 2:24 pm
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>

Hi Listers,

I have an accdb which uses recordsets based on SQL stored procedures to
populate forms.

One form is set to "Continuous Forms" which has columns of numbers. In
the
form footer under each column are fields for column totals.

The control source for the total fields look like this:
=Sum(Nz([SLOPSOpeningBalance],0)).

SLOPSOpeningBalance is the field name. txtSLOPSOpeningBalance is the
control name for the records. txtSLOPSOpeningBalanceSum is the name of
the
form footer control.

The form footer control shows #Error. The main records all show correct
values and there are no nulls. I am converting this database from an adp
which worked fine (but the records came from the Record Source property)


I haven't found a solution on the web for this. The closest solutions I
have come up with is to write code to populate the totals, or to put a
subform in the Form Footer which populates the fields based on a stored
procedure which returns the totals.

Has anyone come across this before?

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand




-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list