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 / New Users / June 2006

Tip: Looking for answers? Try searching our database.

Having table totals appear on form in bound fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SteveC - 21 Jun 2006 21:02 GMT
Using Access 2007, I have a form with a subform.  The subform is seen in
datasheet view and I have used the built in total mechanism to show the
total count (computers) and sum total (purchase price).  This works nicely.
But since the totals are in the subforms in tab pages, they are not always
visible.  I would like to show these totals in a field in the main form.
And to make it a bit more complicated, I would like to add the purchase
price from one subform (computers) with another tabbed subform (accessories)
to show the total expenditure per location.

Thanks.  I am finishing up, so will try not to bother y'all with further
questions for a while.
Al Camp - 22 Jun 2006 14:16 GMT
Steve,
  Create an unbound calculated text control on the main form to display the values from
the subform/s.
  Let's say the count of computers in the subform is called CountComputers.
  You would refer to that field in the calcualted text control as...
       = Forms!frmYourMain!frmYourSubform.Form!CountComputers
               or
       = frmYourSubform.Form!CountComputers

  Addressing the computer prices and accessory prices the same way... (all on one line)
with another calculated text control
       = frmYourSubform.Form!TotalAccPrice +  frmYourSubform.Form!TotalAccPrice

Signature

hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

> Using Access 2007, I have a form with a subform.  The subform is seen in datasheet view
> and I have used the built in total mechanism to show the total count (computers) and sum
[quoted text clipped - 6 lines]
> Thanks.  I am finishing up, so will try not to bother y'all with further questions for a
> while.
SteveC - 22 Jun 2006 19:43 GMT
Al,

Thanks for your help.  I just don't know what I am doing.  I can get Access
to total and add in a datasheet but it doesn't show up as a field. I can get
it to total by adding a field "TotalAccCost" and using Sum([Cost]) in the
footer of the subform.  When I add thr textbox to the Form and use your
reference, I get syntax errors.

Here is what I entered

=frmLocations Subform.Form.Form!TotalAccCost

That didn't work; syntax errors.

I also tried

=Forms!fromLocations!frmLocations Subform.Form!TotalAccCost

I assume I need underlines or brackets or quotation marks somewhere.  Thanks
> Steve,
>   Create an unbound calculated text control on the main form to display
[quoted text clipped - 22 lines]
>> Thanks.  I am finishing up, so will try not to bother y'all with further
>> questions for a while.
Al Camp - 23 Jun 2006 04:17 GMT
Steve,
   Forms!frmLocations![frmLocations Subform].Form!TotalACCCost

   ... a good example as to why you shouldn't use spaces in object names.
   You need the brackets when using an object name with spaces.
Signature

hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

> Al,
>
[quoted text clipped - 37 lines]
>>> Thanks.  I am finishing up, so will try not to bother y'all with further questions for
>>> a while.
 
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.