Results 1 to 2 of 2
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    If New Record Stop Code Exit Sub

    If a user enters a New Record I then want to prevent the rest of the code from executing, can I do this? Will this work?


    Or selectively go to a specific line of code?

    If Me.NewRecord = True Then
    Exit Sub

    Also, where do you start counting the lines of code from? After the code above? Where? Do blank lines count?
    Last edited by burrina; 12-19-2012 at 12:48 PM. Reason: One more thought

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254
    burrina -

    In the form's OnCurrent, I would try...

    If Me.NewRecord = True Then
    Exit Sub
    else
    'execute other code
    end if

    All the best,

    Jim

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

Similar Threads

  1. Replies: 6
    Last Post: 08-22-2012, 03:24 AM
  2. Replies: 3
    Last Post: 07-20-2012, 11:41 AM
  3. Replies: 7
    Last Post: 11-23-2011, 08:14 PM
  4. Emailing Last Record & exit handling
    By malamute20 in forum Programming
    Replies: 25
    Last Post: 08-24-2011, 05:14 AM
  5. Navigation Buttons Stop My Code
    By millerdav99 in forum Programming
    Replies: 6
    Last Post: 03-18-2011, 11:13 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