Solved

Access 2010 Runtime, AutoExec Macro/Function call problem

Posted on 2013-12-30
8
2,311 Views
Last Modified: 2014-01-03
I just developed an app in Access 2010, first time in 2010 but I've used prior versions of Access and prior versions of Sagekey for many, many years.

I tested everything on the app and created an installer using Sagekey 2010.  I then used the created installer to install the app on my local machines.  No issues whatsoever.  As designed the app install Access runtime 2010 as part of the install.

Possibly worth noting that even though the runtime 2010 was installed, all of the machines in the office have full versions of Access 2010 on them also.

Moved the app to my client site.  The only version of Access on those machines is Access 2003.

The application installed just as expected but cancelled in the Autoexec macro with 'function name cannot be found'.  The very first command in the Autoexec runs a function 'fRefreshlinks' to refresh the linked tables in the application.  If the tables aren't where the current links are pointing to, it  reads the information on an .ini file that tells where the data files are on this installation.

Never even executes 'fRefreshlinks', it cancel on the call to the function.

Does the runtime version of Access 2010 have limitations related to an Autoexec or maybe running functions?

I have used this exact same startup method for many years in Access 2003 without issue.

Any ideas what the issue is?
0
Comment
Question by:mlcktmguy
8 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 39747628
<The only version of Access on those machines is Access 2003.>

access db created in higher version does not run smoothly or does not run at all in lower versions. There is no backward compatibility.

you may need to uninstall the clients Access 2003 and install access 2010 or use the 2010 runtime version.
0
 
LVL 34

Assisted Solution

by:PatHartman
PatHartman earned 167 total points
ID: 39747632
The usual problem when an app runs on one PC but not on another is a reference issue.  Since you have only A2003 as a full install, there is no easy way to identify the specific reference that is missing.

Open the app on your PC and look at the referenced libraries.  If any are not installed on the target machine, or if the versions are lower, you will either need to upgrade the client PC or modify your code.  In some cases you can convert from early binding to late binding.
0
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 83 total points
ID: 39747638
@mlcktmguy,

if it is not possible to upgrade your client access version, you have to develop/create the application using Access 2003.
0
 
LVL 34

Assisted Solution

by:PatHartman
PatHartman earned 167 total points
ID: 39747664
I have been developing in A2010 for three years and I still have clients that have mixed environments.  As long as I don't actually use any A2010 features, late binding solves the reference issue.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 83 total points
ID: 39747906
Did you setup a Trusted Location with Sagekey? If not you need to do this. Generally you only need to do this for the FE location.

Also be careful of where the package is installed, if your client is using full blown Windows UAC. You'll have to install to ProgramData, or a folder immediately off the root drive, instead of Program Files in that instance.
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 83 total points
ID: 39747995
I think Scott has probably hit it, but the other thing worth mentioning is that A2010 is far picker about references to things within an app.

Make sure your syntax is spot on.

Jim.
0
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 84 total points
ID: 39748533
Before any VBA code can be executed, the database must be trusted.

I agree with  Scott McDaniel that this is probably a trust issue not getting set by your setup/installer routines.

Windows 7 and Later and Access 2007 and later make deployment of application more difficult. This is for security reason to prevent malicious code from running. That does mean it will require more testing of your deployment packages.

I tested everything on the app and created an installer using Sagekey 2010.  I then used the created installer to install the app on my local machines.  

mlcktmguy, when you installed it on your local machine did you install it into a Virtual Machine (VM) that did not have any version of Access/Office previously  installed?

I find it best when testing installer packages to install it on a "Clean"/"fresh" version of Windows. This allows you to properly test all the settings your installer needs to handle.   Most VM have a fesature that allows you to create a snapshot and then roll back. This is great for repeated tests. Between test runs  you can roll back the Windows instance to the state before you ever tried ti install anything.  This gives you a "Clean" version of Windows each time.

I have VMs for multiple versions of Windows just for testing.
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 39754771
Thank you all great and valuable suggestions and comments.  Since the live date of the project was approaching, there simply wasn't time to resolve this issue.  My bad for waiting so long in the project cycle to test the install.

The issue has not yet been resolve but I will refer back to this thread when I have time to do so.  I'm sure the answer lies in one or many of these responses.

I did end up saving the app as an Access 2003 app and installing that way.  That brought it's own set up problems and additional tasks sine the complete menu system set up for 2010 had to be redone as well as several other items that did not have support in 2003.

Severe time crunch forced that decision

Props to all EE responders for providing such valuable and timely response in a very crucial situation.  I wish I could award more points to you all but 500 is the max.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

932 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

13 Experts available now in Live!

Get 1:1 Help Now