Solved

Access 2010 Return without GoSub

Posted on 2014-07-31
3
1,148 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
ID: 40231296
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
ID: 40231319
<<
 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
ID: 40231321
>>> 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
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…
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

895 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

11 Experts available now in Live!

Get 1:1 Help Now