• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1565
  • Last Modified:

Control Box- Form Open error message return without gosub

I lost power to my computer while I had a form open.  The opened form is serving as my switchboard (although I did not use Access' switchboard tool to make the switchboard form).  The make shift switchboard has 12 control boxes that serve to open up other forms/reports.

After restarting my computer, I again opened the switchboard.  However, when I clicked on any one of the 12 control boxes, Access reported the following error:  "The expression On Click you entered as the event property setting produced the following error:  Return without GoSub."

How can I repair the switchboard....or should I just recreate the original form?

1 Solution
Open it in Design mode and look for the keyword "Return".  Did you make the buttons or did the button wizard?
efurholeAuthor Commented:
Look for the keyword "Return" where...on the form?  If yes, it is not there.

I used the wizard to make the control buttons.

DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Please run this procedure - which will identify a number of possible, which you can then fix:
A **DeCompile** may help here ...

But first, if you have not already:
Check for any **Missing References via the VBA Editor>>Tools>>References ....

Then, follow this procedure:

0) **Backup your MDB**
1) Compact and Repair the MDB, as follows:
Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
3) Close the mdb
4) Open the mdb and do a Compact and Repair (#1 above).
5) Open the mdb:
    a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ... followed by then name of your MDB.
    b) From the VBA Editor Menu at the top of the window:
        Note ... after the word Compile ...you will see the name of your 'Project' - just an fyi.

6) Close the mdb
7) Compact and Repair one more time.

*** Executing the DeCompile **EXAMPLE**:
Here is an **example** of the command line syntax  (be SURE to adjust your path and file name accordingly) for executing the decompile:

Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:
Also, the double quotes are required.

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.mdb"

For more detail on the Decompile subject ... visit the Master on the subject (and other great stuff) Michael Kaplan:


Need the Access 2007 solution for this!

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now