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 / March 2007

Tip: Looking for answers? Try searching our database.

Calculations on a parent form based on info in Child

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
georgeka - 06 Mar 2007 00:03 GMT
Bear with me, I am very new to access...
I have a contributor table and a donations table. I also have a form for each.

On the contributors form I have displayed a child form generated from the
donation table which shows the donations that contributor has made.  I would
like to have a few fields on the parent which totals info listed in the child.

For example:  Count of donations made, Total value of those donations, and
Based on the amount the individual has donated I would like Access to assign
a category.  Friend, Supporter, patron...    I was told to use the following
formulas
Count of Donations:
=dcount("DonationID", "Donations", "ContributorID = " & me.lngContributorID)

Sum of Donations:
=dsum("DonationAmount", "Donations", "ContributorID = " & me.lngContributorID)

Where the me indicates the current form.  I tried replacing that with the
actual form name because I
read that "me" won't work in the control source of calculated controls.  This
would be the new formula  

=DCount("DonationID","Donations","ContributorID = " & [Forms!Donations1!
Contributor ID].lngContributorID)

I am still perplexed on what the lng would do, or how to make this work.

Can anyone please assist?

I appreciate any assistance!!
Carl Rapson - 06 Mar 2007 16:18 GMT
If I understand your question correctly, 'lngContributorID' refers to the
ContributorID field on your main form. Replace 'lngContributorID' with your
field name from the Contributors table.

Carl Rapson

> Bear with me, I am very new to access...
> I have a contributor table and a donations table. I also have a form for
[quoted text clipped - 34 lines]
>
> I appreciate any assistance!!
 
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.