The expression on click error (1 Viewer)

me-keyspetclub

New member
Local time
Today, 00:46
Joined
Mar 5, 2009
Messages
9
Hello,

I apologize if this has been previously posted, I have searched for hours and havent been able to find a solution.

This is the issue. We have a 2003 access database with a buitl in gui running on windows xp. It is currentlyworking on 3 pcs fine, but now we tried to run it on a new machine and it gives the following error:

The expression On Click you entered as the event property setting produced the following error: Object or class does not support the set of evernt.
* The expression may not result in the name of a macro, the name of a user-defined function, or [event Procedure].

and it goes on and on.

I have already tried:
1) downloading Jet 4 SP8 but the machine already has a newer version.
2) looking up into tools-references to ensure nothing is missing
3) re-registering the DAO360.dll and others
4) have log in with admin rights
5) ensure Macro security settings are set to LOW
6) checked the sanboxmode is 3

I am not sure what else I can check. This database is fully operational on the other mahcines, so I know its nothing to do with the code.

any ideas???.... Thanks.
 

boblarson

Smeghead
Local time
Today, 00:46
Joined
Jan 12, 2001
Messages
32,059
Try this -

Open the database on the new machine by holding shift down so it bypasses the normal opening mode. Go to TOOLS > ANALYZE > DOCUMENTER and select the forms tab. Select all and then click OK. See if it goes all of the way through or if it errors out. If it errors out click OK and then note the name of the form which comes up in the following dialog. Continue on until it finishes. Then if it had generated an error when doing that, it is likely an ActiveX control used on the form in question and it isn't installed on this machine.
 

me-keyspetclub

New member
Local time
Today, 00:46
Joined
Mar 5, 2009
Messages
9
Thanks Bob, I will try that....at the moment I notice that the other machines are running windows xp sp3 and the one where it is not running is using windows xp sp2 so we are downloanding and installing the sp3...hope I dont wreck things further...
 

boblarson

Smeghead
Local time
Today, 00:46
Joined
Jan 12, 2001
Messages
32,059
You definitely should be on the same services pack level both on the Windows version AND the Office version.
 

me-keyspetclub

New member
Local time
Today, 00:46
Joined
Mar 5, 2009
Messages
9
Hi Bob.

ok, I ran the analyzer documenter and it gave an error on a few forms. I notice that these forms are using the environ$("username") function. I have done some reading on that, but have not been able to decipher if I need to add files (libraries) to the machine or what. Any idea??
 

boblarson

Smeghead
Local time
Today, 00:46
Joined
Jan 12, 2001
Messages
32,059
So, they don't have any ActiveX controls on them? Try changing the

Environ$("username")

to

VBA.Environ("username")

instead
 

me-keyspetclub

New member
Local time
Today, 00:46
Joined
Mar 5, 2009
Messages
9
Thanks Bob!!

actually, as it is most of the time, it was right in front of my eyes....we went over so many things and finally checked the libraries being refenced once again via the Tools menu and found that I had ms access 11 and the other pc had ms access 12 library, so we copied the file ms access 11 from the office11 folder into the office12 folder as it would not let us change the path and that did it...
a whole day and that was all it was....and we had gone over it too! I am almost kicking myself, but not quite...
thanks again!!...it is solved....
 

boblarson

Smeghead
Local time
Today, 00:46
Joined
Jan 12, 2001
Messages
32,059
1. You shouldn't be copying the file over to the Office 12 folder. That is a very bad idea.

2. What it would appear to be then is that you have multiple versions of Access installed and the Access 2007 version shouldn't have a problem opening the Access 2003 database. It would automatically upgrade the references to the Access 12 reference.

3. If you have the same file being accessed by 2003 and 2007 versions then you should not be using the same file. They should each have their own copy of the frontend (should be anyway) so that the 2007 version when it opens it doesn't change the references and then the older versions will have a problem.

4. By copying that file over, you potentally have hosed the installation on the computer - even though it might appear to work, it is likely going to come back and bite you.
 

me-keyspetclub

New member
Local time
Today, 00:46
Joined
Mar 5, 2009
Messages
9
Hi Bob.

You are correct, both versions of access are installed on that machine.

But we have not converted the database to 2007 yet. I tried opening it and it gave me errors which I dont have time to deal with right now, or rather I am not allow to deal with them right now. They are not even sure if we should convert.

I am not sure why the references was picking that file and it would not let us change it. I did back-up the original office 12 file. Of course, it may take a heck of a time to figure out the error when it re-appears if I am not here.

But thanks for helping me out. You enjoy your weekend! Looking forward to some sun-shine, with all the rain we have been getting, I feel like I live near London, England and not London, Ontario!
 

Users who are viewing this thread

Top Bottom