Link to home
Start Free TrialLog in
Avatar of Rob4077
Rob4077Flag for Australia

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rob4077

ASKER

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rob4077

ASKER

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.
Avatar of Rob4077

ASKER

Looks like that's fixed the issues. Thanks for your kind support that led me to finding the correct solution