# MS Access Macro broken on different PC



## Mr Bean (May 12, 2011)

Hello,

I am trying to help out a small company who's main computer has been sent away for repair by lending them a spare one that I have.

There's only one program that they wanted me to install, and from what I understand it is their customer database software which is basically _Microsoft Access 2003 Runtime_ + some files made to run in Access (.mdb, .mdw, .mde).

I installed it using the CD they gave me which I believe was originally produced by the company they paid to develop the custom software for them.
The setup wizard on the disc installs fine and reports no errors.

When running the Access database via the installed desktop shortcut all appears fine at first with the custom forms looking exactly as they should.
However when they actually started using it for real they reported that there are problems with certain parts of the database with error messages pointing to some sort of macro problem.
Here is a screenshot of one of the messages if it helps:


At first I thought it could be because the macro contained commands from missing software (not sure if this is even possible?) such as .NET and the various C++ redistributable packages. So I installed all of these types of updates from the Windows update website but the errors still appeared.

I would contact the original creator of the Access database if I could but support for it has now run out and I think it's pretty old.

Any suggestions are much appreciated and I am willing to experiment as I have already spent several days trying to get this to work.
Thanks.

*Edit:* I should note that whilst they do not yet have access to the computer that this database was working correctly on, they do have the hard-drive with all the original files. So if you know of a location or file type that might be worth looking at it would be appreciated.


----------



## AlbertMC2 (Jul 15, 2010)

Hi

What is the type of file that the shortcut, on the desktop, is trying to run?
ie .exe / .mdb / .mde ?


----------



## Mr Bean (May 12, 2011)

Hello,

The exact contents in the target field of the shortcut is:

```
"C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE"  /runtime /wrkgrp c:\progra~1\jrm\jrm.mdw c:\progra~1\jrm\sys2k3.mde
```


----------



## AlbertMC2 (Jul 15, 2010)

Is it a large installation file?
Can you zip and attach it or upload it to an upload site?


----------



## Mr Bean (May 12, 2011)

Yes here it is and the zip is >30MB.
http://www.filedropper.com/jrminstall

I'm not sure how much use it will be to you though as when the database is run after a fresh install it just asks for a license number and won't proceed without one.
The license number hasn't been provided to me but fortunately this doesn't matter as the procedure for restoring a database, as provided on a bit of paper with the CD, is to simply overwrite the fresh database files with the old ones which were already registered and thus don't ask for the license number.

Also MS Access 2003 Runtime is on another CD which I can also upload if you like but on the case a sticker reads "_Only use if you do not have Microsoft Access 2000 or 2003 installed on your system already._"


----------



## AlbertMC2 (Jul 15, 2010)

Hi

Ok I have downloaded and installed the DB.
You are correct about the registration but I can use it as an evaluation version.
So...what exactly are you doing to get the error?


----------



## Mr Bean (May 12, 2011)

On the main screen I click on "_Add Customer Repair_", then I type part of a customers surname, which has previously been added, into the "_Surname_" field at the top-right of the window and press the search button.
This is when the error occurs.

You may need to add a new customer first before trying this which you can do within "_Add Customer Repair_".


----------



## Mr Bean (May 12, 2011)

Apart from the ability to create/edit databases, is there much of a difference between "_Microsoft Access 2003 Runtime_" and the version included with Office 2003?

I might uninstall the Runtime version and temporarily install my version from Office 2003 for testing purposes.
If it worked it would be great but then I would either have to figure out what is missing from the Runtime version or get them to purchase Office 2003 so that they can have there own license, especially if the original computer with the working database cannot be fixed or needs a re-install.
There shouldn't be anything missing in the Runtime version though considering it came as part of the software package.

Also after doing a lot of Googleing it would appear that these types of errors:


> The expression On Click you entered as the event property setting produced the following error: Function is not available in expresssions in query expression ' cid > 1 And (trim(jrmCustomer.cSurname) like 'o*') '.
> 
> * The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
> * There may have been an error evaluating the function, event, or macro.


often occur due to issues with references that the database file needs.
Most of the suggestions are to check which references are set and to see if there are any missing, but I cannot get to this screen as CTRL+G and ALT+F11 both do nothing.
Perhaps this is not possible on a Runtime version of Access or when a .MDE file is involved.


----------



## Mr Bean (May 12, 2011)

So I went ahead and replaced _Access 2003 Runtime_ with the full version from a Office 2003 CD.
Same result.

The error message this time though offers some additional help:


> Visual Basic for Applications (VBA) encountered a problem while attempting to access a property or method.



Most of the suggestions assume you have the source code available.


----------



## AlbertMC2 (Jul 15, 2010)

Hi

Sorry for the delay.
I have installed the application and unfortunately it works on my PC.

You are correct in saying that there is possibly a reference that is missing in the VBA.
What you could try is install the Access 2007 Runtime.

Unfortunately we do not have the admin rights to view or change any of the VBA and therefore cannot see which references are missing.

But I am still working on it.


----------



## Mr Bean (May 12, 2011)

Hi

Thanks for trying the application and confirming it works for you.

I may install _Access 2007 Runtime_ but first I think might re-install Windows and again see if it works on the full version of _Access 2003_.

I get the feeling that the original install of _Access 2003 Runtime_ made some system changes that were never undone when it was replaced by the Office 2003 version.
Since the Runtime was provided as part of the database software package maybe it includes some files that are no longer needed or are outdated?
It can't contain anything essential if the database worked on your system without it.

My Windows CD has most updates integrated so a re-install should be fairly quick.


----------

