Results 1 to 3 of 3
  1. #1
    kiwikiki718 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    11

    Switchboard wont open Return without go sub error

    today I went to open my database and the switch board does not open. I receive the error message stating :the expression on open you entered as the event property setting return without gosub. I am not sure what this means. please help.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    you should be able to show us the code.
    next time click DEBUG and it will show the bad line.
    somewhere in the code it is hitting a RETURN line, but code cannot hit it unless it was sent by a GOSUB line first.

    Code:
    ...
    gosub MySub
    code
    code
    exit sub
    
    MySub:
    code
    code
    RETURN
    end sub

  3. #3
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    this one is often due to corruption - use the compact/repair option and compile your code.
    Another reason can be load events on a subform with no load event on a main form, but I doubt your nav form has sub forms...
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. file on network wont open
    By sbrady19 in forum Access
    Replies: 10
    Last Post: 03-11-2015, 07:58 AM
  2. Close a form & return to Switchboard
    By ScottXe in forum Forms
    Replies: 14
    Last Post: 08-24-2014, 02:46 AM
  3. reports wont open
    By jamo in forum Reports
    Replies: 3
    Last Post: 10-15-2012, 05:56 AM
  4. Replies: 4
    Last Post: 03-06-2012, 12:53 PM
  5. Database wont open
    By sarah54 in forum Access
    Replies: 22
    Last Post: 12-08-2010, 08:38 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