Results 1 to 4 of 4
  1. #1
    dougie is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    27

    Cancel when there is a required field


    I have a form with a subform. The subform has as its datasource a table with some required fields. If the user accidentally enters a new record on the subform (which can be done simply by pressing a key in the new record row) it seems to be impossible to cancel out of this - the 'required field' messsage pops back no matter what you do. I've tried me.undo, me.subformname.form.undo but so far nothing works. Any ideas?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    If memory serves, the required field error can be trapped in the form's error event. Is that where you're trying this?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dougie is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    27
    Yes. Sorry to waste your time - problem seems to have been caused by a corrupt form - there was nothing wrong with my VBA. Very annoying.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    No problem, glad you got it sorted out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 01-15-2012, 02:46 PM
  2. Save as Draft but mandatory field is not required
    By zuerin in forum Programming
    Replies: 5
    Last Post: 06-30-2011, 01:42 AM
  3. Yes/No/Cancel Message Box
    By lynnmc26 in forum Access
    Replies: 0
    Last Post: 04-01-2011, 07:26 PM
  4. Cancel new record
    By oakoen in forum Forms
    Replies: 11
    Last Post: 12-18-2010, 09:26 AM
  5. Required Field Help
    By brandonb in forum Access
    Replies: 4
    Last Post: 11-13-2009, 11:18 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