Solved

Access 2010 Return without GoSub

Posted on 2014-07-31
3
1,093 Views
Last Modified: 2014-08-05
I have copied a database renamed & saved it. When I open the original Db and then press the button to 'Load New Events' it works fine. When I open the copied Db and press the 'Load New Events' I get the error message "The expression On Click you entered as the event property setting produced the following error: Return without GoSub"

However if I F11 to open the code then press the button to 'Load New Events' without even looking at the code it works.

Any expert have any ideas what is going on here?

Thanks
0
Comment
Question by:Jagwarman
  • 2
3 Comments
 
LVL 84
Comment Utility
You could have one of several issues. Make a backup before you try any of these suggestions:

1. You may simply be missing a Reference. Open the new database, then open the VBA Editor and click Debug - Compile. If you have any missing references, the compile process should find those, and you'll get an errors that will point you in that direction. Remake the referenced, and then continue with the Compile. Fix any errors, and continue doing this until the menuitem is disabled.

2. You may have some corruption in the database. To try and fix that, first Compact the database, then Compile it (as above) and then Compact it again.
1
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
<<
 When I open the original Db and then press the button to 'Load New Events' it works fine. When I open the copied Db...
>>

In addition to Scott's comments, the name of the database may have some importance in the code that could be causing the copied/renamed database to fail.

If the suggestions in his comment don't help, post the block of code that is failing.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
Comment Utility
>>> that could be causing the copied/renamed database to fail.

A quick test for that would be to move the original, working database temporarily, and place the copy in the original folder, giving it the same name as the original database.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now