Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Search Search
Search for:
Tech Support Guy > > >

Solved: Return without GoSub?


(!)

maxx_eclipse's Avatar
maxx_eclipse maxx_eclipse is offline
Computer Specs
Member with 291 posts.
THREAD STARTER
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
29-Jan-2009, 01:44 AM #1
Solved: Return without GoSub?
Morning all,

I've just come across an error this morning when i was testing a macro in my database, when I was returned with the error: "Return Without GoSub".

Anybody know what this means?

The macro that returns this error is an OpenForm macro with the Where condition: ="[ID]=" & NZ([ID],0).

What it basically does is allow the user to click on the ID of an entry, and the link will activate a new form window to load to the selected entry.

This was working all wonderfully yesterday, and now it doesn't work anymore. I tried running an error check (Ctrl+Break) and also a 'Compact and Repair', but with no success.

Any ideas what I can do?

Help is much appreciated!
maxx_eclipse's Avatar
maxx_eclipse maxx_eclipse is offline
Computer Specs
Member with 291 posts.
THREAD STARTER
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
29-Jan-2009, 01:58 AM #2
Problem solved:

Quote:
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

7. Still in the code window, choose Options on the Tools menu. On the
General tab, make sure Error Trapping is set to:
Break on Unhandled Errors
and the Compile on Demand is unchecked.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
the code syntax is compilable, and the VBA options are set to show errors
and avoid this kind of corruption.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑