Execution error on runtime version

I have developed a database using MS Access 2013 that works fine on my machine but some of the functions crash with an execution error when run on machines using 2013 Free Runtime. What do I need to look out for to make sure it works on both?
LVL 1
Rob4077Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
1. Make sure you have rock solid error handling in all of your subs and functions.
2. What were you doing when the error happened?
Because you are using a runtime, there is no design View.  
So any code you have that relies on design view will fail.
3. Make sure you include all the libraries and files (DLL, OCX) and external files in the runtime

Lets see what other experts may add.

JeffCoachman

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Also be sure the database is in a Trusted Location, both the Frontend and Backend.

References are often a cause of this - are you absolutely certain your references are correct in the runtime environment? If you list the references you have, we might be able to spot potential trouble ones.
Dale FyeOwner, Developing Solutions LLCCommented:
You might want to institute some form of generic error handler, which stores the UserId, formname, procedure name, error number and error description into a table when an error occurs.  This will allow you to look into this Errors table to identify what error occurred and some information.  If you have line numbers in your application, you can also use ERL to get the line number where the error occurred:

debug.print ERL, err.number, err.Description.

If you code lines are not numbered, ERL will return a zero.  You can manually add line numbers to your code, or use one of several 3rd party tools to do this.  I use MZ-Tools

There is also a free error reporting tool available from TheSmileyCoder
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Rob4077Author Commented:
Thanks for all of your suggestions.

I already have line numbers error traps, as well as some limited logging to a text file, in the code but it's not being picked up by those - I need to put more detailed logging. It's actually crashing with a Code Execution error that's not being picked up by the error traps.

I had a bit more of a look today at one of the issues and it seems rather odd to me. If the user enters a date in a field on one subform and presses enter, then clicks on a field on another subform it all goes perfectly, but it crashes is if they enter a date in one subform then click on a field in another subform without pressing enter in between. The After Update event on the updated field executes correctly and then it crashes. What I have to do is now check if the On Click event of the field they click on in the second form also executes but my first look at the log would seem to indicate that it does and the crash occurs sometime into that code. However if they click on that second subform without first updating the date field on the other subform it works. The date field and the other field they click on are not related in any way and even work on different tables. On my Full MS Access system there's no crash no matter which way I do it.

I suspected that there may be some known differences between the two versions. I create more detailed logging tomorrow and post the results if I can't find the source of the problem.

Thanks again for your suggestions
PatHartmanCommented:
Rename the file extension to .accdr.  That will tell Access to pretend to be the runtime engine.  I don't know if it will still error out on your machine but it does allow you to do actual testing on a PC with full Access installed.
Rob4077Author Commented:
I think I may have found one of the problems and it's not where I thought.  When the user starts entering data in a combo box I want it to open so in the On Change event I entered the following code:
    If Len(Me.cboFindJob.Text) > 1 Then Me.cboFindJob.Dropdown
This works fine if you use the enter key (which I always have) but if you use the mouse to point to an item in the list an error occurs saying that you can't use that command unless the field has focus. I've now tried adding me.cboFindJob.setfocus before the abovementioned code and it seems to work fine. I will leave it run for a few hours but if this fixes the problem then it means I have wasted your time (sorry) and I will close out the question.
Rob4077Author Commented:
Looks like that's fixed the issues. Thanks for your kind support that led me to finding the correct solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.