Results 1 to 2 of 2
  1. #1
    eww is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    125

    Subform, Totals, in Datasheet view

    This is kind of a collection of problems in one so get ready.



    In making this database one of my requirements was that I sometimes needed to have calculated values directly in the forms. An example of this would be: employees enter weights that they are working on in a job to several records, then I total those records and make them available in another form.

    The way that I have found so far to get this result (I say so far because I'm pretty new to Access still and there's probably a better way somewhere) is I make a query that sums those weights, then I create a subform with a source object of this query in the form I want the sum to show up in. I also create a seperate entry field in this form for that sum and once all this is done I put the code in to set that field equal to the result in this subform (I also make the subform invisible). The reason I make this field is so that I can interact with the data from there on.

    My problem now is I have a form with two subforms in it. One is a submittal entry form (for weights, etc.) the other is a segments entry form which categorize the submittal entries. I'm trying to get the total weights to show up for each segment which I have managed to do so with my subform query sum method, however the segments subform is in a datasheetview. It seems that, for some reason, in order to get the totals to show up in their proper field, I first have to expand the plus sign for each segment, then click into the empty weight field and the weight will show up. I've tried ways to get around this, like refreshes and requeries, and nothing seems to work. However there's always the possibility that I was not doing these properly.

    Sorry this was so long but I thought it'd be better to list as much information as possible.

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    If your form is a continuous form you can do sums in the form footer.

    If this isn't a good solution you could do the sums using functions to populate the calculated controls.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Missing Columns in Datasheet View
    By mikel in forum Access
    Replies: 3
    Last Post: 01-02-2015, 01:57 PM
  2. Cascading combo boxes in datasheet view
    By Hjava in forum Forms
    Replies: 1
    Last Post: 06-28-2010, 06:02 PM
  3. vertical text in datasheet view?
    By johncinpcb in forum Forms
    Replies: 0
    Last Post: 06-14-2010, 07:14 AM
  4. Datasheet View
    By Evgeny in forum Programming
    Replies: 6
    Last Post: 04-28-2010, 10:17 AM
  5. Form - Datasheet View
    By kalove in forum Forms
    Replies: 0
    Last Post: 06-20-2007, 11:29 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums