Results 1 to 3 of 3
  1. #1
    MuskokaMad is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Posts
    17

    Keeping a Form from Closing Until Subforms are filled

    Thanks to everyone for your ongoing feedback and support.



    I have a Form frm_NewOrderEntry with 3 tabs each of which contains a subform. sfrm_NewOrderDetails, sfrm_Payments and sfrm_DeliveryDetails.

    Each Subform has Required Fields in their properties.

    I would like to do the following...

    1 Ensure that at least 1 record has been created in each subform before the Main form closes.

    2. Ideally. Force the user to navigate between the tabs in the OrderDetail, Payment then Delivery sequence.

    3. In a Perfect World. Validate that the Sum of Payments in sfrm_Payments is >= Sum of Transactions in sfrm_OrderDetails.

    Suggestions

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Use a button to close the form, rather than the form close button on the top right corner of the form.

    On the btnClose_Click event, test to be certain that each of the subforms is populated.

    As a subform is populated, set focus to the next subform.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    FYI, the UnLoad event of a form fires regardless of how the form is closed and can be canceled to stop the close, so a special button is not really required.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-19-2010, 05:36 AM
  2. Replies: 9
    Last Post: 12-28-2009, 04:01 PM
  3. Replies: 0
    Last Post: 10-14-2009, 02:44 AM
  4. Replies: 0
    Last Post: 12-16-2008, 07:49 AM
  5. Replies: 2
    Last Post: 04-11-2006, 08:40 AM

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