Return without GoSub error

Bhaughbb

Registered User.
Local time
Today, 15:36
Joined
Aug 19, 2005
Messages
38
I have a database that suddenly has a new error this morning that might have been caused by another user while I was not in the database. When an event procedure is triggered by a form the following error is given, regardless of the code or the event that triggered it: "The expression on [event name] you entered as the event property setting produced the following error: Return without GoSub" The same error message occurs for Macros. The unusual part is if I open the VB editor and then close it the errors go away for the rest of the time I have the database open. Any ideas what might have caused this error or suggestions to fix it?
 
Not sure if this will help all that much, but when the error runs, press Ctrl + Break and click Debug. This will (should) take you to the part of the code that is creating the error.

Hope this helps :)
 
Unforunately that only closes the error message and nothing further happens. I've also just on a whim run the compact/repair tool and that doesn't have any effect either.

I did however randomly find the cause but don't understand why the problem occured. A 'On Lost Focus' event had been set on the first button of the primary form of the database but nothing had been defined in it other than the sub existing and for some reason when the 'On Load' event for the form launched it triggered the lost focus event and the error was occuring and causing everything else to break. I just noticed it when I had the properties window up while trying to look for the cause.

Thanks for the tip though!
 

Users who are viewing this thread

Back
Top Bottom