Results 1 to 3 of 3
  1. #1
    bginhb is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2011
    Location
    Huntington Beach, CA, USA
    Posts
    47

    Is there a way to ...

    I am using a form with a subform - this issue is about the subform.



    The subform accesses a dynaset and data can be entered into a quantity field in each record of the subform. Owing to intentional design no records may be added to the subform.

    Here's the issue ... the subform also wants to total the amount of the quantity field and display it on the subform heading but if I disallow additions Access will not allow the last record in the dynaset to update and therefore its value will not be added to the total counter that uses a domain aggregate to sum the quantity.

    If I do allow additions I can get the totals to update but I expose the application to the possibility of a User adding an unwanted record or having Access display one of its Error Dialogs that only developers can understand.

    Seems to me I've been fighting this problem forever and I would like to get it finally resolved.

    Appreciate any assistance.

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    What you need to do is to force a save. Depending on what you need as being required, you could just add this code to each control's after update event:
    Code:
    If Me.Dirty Then Me.Dirty = False

  3. #3
    bginhb is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2011
    Location
    Huntington Beach, CA, USA
    Posts
    47
    Thanks Bob, that solved my problem.

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

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