?
Solved

Access 2010 Return without GoSub

Posted on 2014-07-31
3
Medium Priority
?
1,445 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 2000 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

801 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