On Mouse Move Error!

S

Stonewall

I've never seen this error before. I have an existing access 2000 application
that has worked fine for years. Recently, various new users I have sent the
application to are getting odd errors on some forms that I haven't made
changes to for years.

One of the errors reported is this one: The expression On Mouse Move you
entered as the event property setting has a function name the software can't
find. The user is simply clicking on a menu option that has always worked.
The menu option has an On Click property setting that runs a macro. I looked
at the macro and it's still there. Inside the macro it performs a RUNCODE
procedure.

Another similar error is happening in this same application when the user
goes to print any report that calls a Dialog Form that shows a list of
reports with option groups for them to select. In this case when the report
is selected and they press PRINT PREVIEW they get this message: The
expression ON VISIBLE you entered as the event property setting has a
function name the software can't find. In this case if I go into the macro
and delete the SET VALUE Visible No line the error goes away.

These macros have been in existence for 5 years or more. Why is this 2000
application suddenly upset about them?

Thanks
 
K

Klatuu

This looks like Library Reference problems. Check your references on a
machine that is not working correctly. That user may be using a new version
of Access or Office. These changes can cause that kind of problem.
Here is a sub that will list the name of all the references you have
established and the path to the library file.

Sub CheckReferences()
Dim objRef As Reference
Debug.Print "you have " & Application.References.Count & " References"
For Each objRef In Application.References
Debug.Print objRef.Name & " " & objRef.FullPath
Next
End Sub
 
D

Douglas J Steele

Just a comment.

If there is a References problem, your code is going to fail. that's because
when the IsBroken property is True, Microsoft Access generates an error when
you try to read the Name or FullPath properties.
 
K

Klatuu

So would this fix it:
Sub CheckReferences()
Dim objRef As Reference
Debug.Print "you have " & Application.References.Count & " References"
For Each objRef In Application.References
If objRef.IsBroken = True Then
Debug.Print objRef.Name & " Is Missing"
Else
Debug.Print objRef.Name & " " & objRef.FullPath
End If
Next
End Sub
 
S

Stonewall

Yes, the new user is using access 2003 but when I distribute the application
I send runtime 200 with it. How do I fix this? The user is in another
state so I don't have access to their computer but I want to fix this so when
I send the app to someone else, it doesn't happen again.

Thanks
 
S

Stonewall

How do I fix a reference problem on a customer's computer? I would have to
email the fix to them since they are located elsewhere. I checked and they
are running access 2003 but my software is written in 2000 and is sent to the
user with runtime 2000.
 
D

Douglas J Steele

Unfortunately, no, because the Name property isn't accessible.

You could show its GUID, although it's doubtful that that will mean much to
the average person!
 
K

Klatuu

This is a bit of a problem, because you don't have the same library files on
your computer that they have on their computer. If you are sending an mdb,
then you could train them on establishing references or talk them through it
over the phone. If you are sending an mde, then the only way it would work
would be for you to include the library files in your packager. The problem
here is licensing. I am not sure of the the legal issues with distributing
these files.
What you would have to do is ceate a subdirectory to the directory where
your mde will reside or possibly where your runtime will reside, and put a
copy of all the libraries you need in that directory and set your references
to these copies.
But, before I did all that, I would check the legal status. Also, be aware
that this is a concept. I have not done it this way. I did have an issue
where we had some people running 2000 and some running 2003 for a while, and
we had to actually go to user's machines and reset references in some cases.
 
K

Klatuu

Yes, that is obvious. But, in reality, if the code fails, then you know you
have a reference problem :)
 
D

Douglas J Steele

I've actually built applications where I've put a table containing the
details of all of the references into each copy of the front-end. In that
way, if there is a broken reference, you can look in the table to determine
the details about it.
 
K

Klatuu

Not a bad idea.

Douglas J Steele said:
I've actually built applications where I've put a table containing the
details of all of the references into each copy of the front-end. In that
way, if there is a broken reference, you can look in the table to determine
the details about it.
 
S

Stonewall

I am sending an mde database. Many of my users have the full version of
Access 2003 on their computers as part of their Office installation. In that
case, is there a legal issue if they have purchased the full version?
Assuming there isn't a legal issue, which library files should I make sure
they have? It seems I only have problems when they try to run a macro.

Another thing worth mentioning is about the same time these errors started
occuring, I installed the full version of access 2003 on the same computer I
have Access 2000 on. Could this have broken the 2000 application?

Thanks for all your help.
 
K

Klatuu

Could be they are fighting each other.
Also, are you using DAO, ADO, or a mixture of both? If you are using both,
you should fully qualify your objects so there is no confusion there.
 
S

Stonewall

The end user typically only has one version of access. I have two versions
of access on my development computer but I don't get the errors. Only when I
ship it to a customer and then only some of the time.

The library references I have listed in my access2000 database are these:
Visual basic for Access
Microsoft Access 9.0 Object Library
OLE automation
Microsoft Visual Basic for Applications 5.3
Microsoft DAO 3.6 Object Library
Microsoft Calender 11.0

When I look at the references in my access 2003 databases, it has the same
libraries listed as the 2000 version. Should that be the case or should they
be different?
 
K

Klatuu

I am on Office 2003 and Access 2003. These are all the links I use:
VBA C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL
Access C:\Program Files\Microsoft Office\OFFICE11\MSACC.OLB
DAO C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll
Excel C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE
Outlook C:\Program Files\Microsoft Office\OFFICE11\msoutl.olb

Now I am in quess mode:
I think (maybe) the Access versions between 9.0 and 11 could be the problem
if they are running 2003. I know we had some issues with it.
But, if you are distributing a 2000 runtime, that should not be the problem.
Do you know if they have the 9.0 library on their systems?
 
S

Stonewall

No, I don't know if they have the 9.0 library. Wouldn't it get distributed
with the runtime? If the 2000 application is using the 11.0 library would
that cause the problem? In most cases they had the 2003 access before they
instaleld the 2000 application with the runtime. Could my app be using the
11.0 library instead of the one that came with runtime? I am so confused.
Any ideas on how to fix it?
 
K

Klatuu

I wish I had a definitive answer for your. Since you are distributing the
runtime, you would not be able to determine the references on the problem
machine. I don't know if the libraries are shipped with the runtime. You
might try including the libraries with the mde, but you will probably have to
put them in a directory with the runtime executable or in a subdirectory with
the app.
 
D

Douglas J. Steele

The runtime ships with the necessary files, so that the correct version of
msacc.olb will be present.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top