Solved

Access 2010 Return without GoSub

Posted on 2014-07-31
3
1,382 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 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