Results 1 to 2 of 2
  1. #1
    c.d.power's Avatar
    c.d.power is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Feb 2019

    What is the best practice alternative for GoTo?

    I am currently using the GoTo command via a Macro in my DB. It's used on various forms to open a New Record.

    For example, when a user is done entering all the data in the required form fields there is a Save button that runs two Macros: SaveRecord and GoTo > Object Type = the current form > Record = New.

    I've read recently, however, that using GoTo command, unless part of the OnError process, is considered bad practice. Considering this, what's the best alternative?

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    That's not the kind of GOTO that is frowned upon. The bad GOTO occurs within a code procedure for example, to skip over some code to transfer processing at a code label (which label end with a colon). I don't think it's possible to code this type of GOTO in a macro.

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

Similar Threads

  1. On error Goto Problem
    By jtmott in forum Programming
    Replies: 2
    Last Post: 06-17-2016, 09:10 AM
  2. Goto Record Problem
    By The Professor in forum Forms
    Replies: 6
    Last Post: 02-15-2013, 04:39 PM
  3. Goto Record
    By jgalloway in forum Forms
    Replies: 8
    Last Post: 09-25-2011, 08:03 AM
  4. Best practice?
    By thekruser in forum Queries
    Replies: 2
    Last Post: 09-20-2010, 09:41 AM
  5. Making Goto combo box
    By dragmn2 in forum Forms
    Replies: 0
    Last Post: 07-03-2010, 11:53 PM

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 - Senior Forums