Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

Problems with Sum function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jy - 03 May 2005 04:32 GMT
Hi,

I am quite a new user to Access and require some assistance.

I have a form with two (2) levels of sub-forms. The main form and the first
level subforms are in Single Form format, while the  second level subform is
in Database format.

When I try to Sum the data in the second level sub-form, I dun have a
problem, but when I try to Sum the data in the first level sub-form, it shows
as #Error.

Is it because Access does not allow the Sum function for forms in Form format?

What is the difference between DSum and Sum?

Thks! ;-)
Marshall Barton - 03 May 2005 05:23 GMT
>I have a form with two (2) levels of sub-forms. The main form and the first
>level subforms are in Single Form format, while the  second level subform is
[quoted text clipped - 7 lines]
>
>What is the difference between DSum and Sum?

When the Sum function is used in a text box expression, it
operates on a field in the form's dataset (the form's Record
Source table/query).  It works for any level and any view of
a form (or report).  Normally, it's used in the form's
Header or Footer section.  By its very nature, it does not
work in the Page Header or Footer.

I suspect that your problem is that you could be trying to
use it to sum a form control's value instead of a
table/query field. Either that, or that you spelled the name
of the field incorrectly.

On the other hand, DSum is a VBA function that goes directly
to a table or query to sum a field in the entire table,
subject to a filtering expression.  While it is generally
slower than Sum, it is usually used for a different purpose.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.