Results 1 to 4 of 4

Thread: CLose Button

  1. #1
    Join Date
    Jun 2004
    Posts
    14

    Question Unanswered: CLose Button

    When I close my form with the X in the corner it warns me about required fields missing in a new record.

    I created a Close button with the wizard... but it doesn't warn me, just closes the form without saving the new record if one of the required field is missing.

    Can anyone help me get the button to work just like the X?

    thanks.

  2. #2
    Join Date
    Dec 2001
    Posts
    79
    Try this from your command button OnClick event procedure:

    DoCmd.Close acForm, "", acSavePrompt

    Hope this helps,
    Peter De Baets
    Peter's Software - Microsoft Access Tools for Developers
    http://www.peterssoftware.com

  3. #3
    Join Date
    Dec 2001
    Posts
    79
    I meant:

    DoCmd.Close acForm, Me.Name, acSavePrompt
    Peter De Baets
    Peter's Software - Microsoft Access Tools for Developers
    http://www.peterssoftware.com

  4. #4
    Join Date
    Jun 2004
    Posts
    14
    You da man!

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •