Code halts on one PC but not others

L

Leslie Isaacs

Hello All

I have a split FE/BE A2K mdb, with the FE on 5 PCs. On 4 of the PCs all is
well, but on the 5th there is a problem with one form: the combobox
'CboMoveTo' doesn't work - gives error message "Compile error - method or
data member not found", and the code halts on the line:

If Not IsNull(Me.cboMoveTo) Then

This combobox and the code behind it was created using the wizard, and
taking the option to 'Find a record based on the value selected ...' .


Also on the form, a button that fires an append query and then has the line:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

causes the mdb to freeze on that line - only Ctrl-Alt-Del gets me out.

If I rem out that line, the code behind the button does continue with some
other commands but then halts with the message "Object invalid or no longer
set" on the first line of the following function (and again only
Ctrl-Alt-Del gets me out):

Function fOSMachineName() As String
'Returns the computername
Dim lngLen As Long, lngX As Long
Dim strCompName As String
lngLen = 16
strCompName = String$(lngLen, 0)
lngX = apiGetComputerName(strCompName, lngLen)
If lngX <> 0 Then
fOSMachineName = LEFT$(strCompName, lngLen)
Else
fOSMachineName = ""
End If
End Function


These problems cannot be due to a corrupt FE, because it is identical to the
FEs on the other PCs, where none of these problems occur. I have checked
that all the references are also the same on each PC, and I have run
scandisk on the problem PC.

Hope someone can help.
Many thanks
Leslie Isaacs
 
C

Clifford Bass

Hi Leslie,

I would suspect the reason is references that are not converting
properly between different versions of Access. What is the version of Access
in those that it works? And what is the version on the one that it does not?
If not the same, upgrade those that have older versions so they all have the
same version.

Clifford Bass
 
L

Leslie Isaacs

Hello Clifford

Thanks for your reply.
All the PCs are on A2K, and Windows XP.
I've racked my brains on this, but cannot think what is going on. If you
have any other ideas I'd be really grateful!!

Thanks agin
Les
 
C

Clifford Bass

Hi Leslie,

It still sounds like a reference issue. I think this because it is
trying to recompile the code, even though it should already be compiled.
Perhaps some version of something is not on the effected computer. On that
computer when you get the error, go to the Run menu and choose Reset. Then
go to the Tools menu and choose References. Do any of those checked at the
top show as missing? If so, then you will need to install whatever it is
onto that machine.

Hope that helps,

Clifford Bass
 
L

Leslie Isaacs

Hello Clifford

Many thanks for your further reply.
I agree that this does look like a references issue, so - although the list
of references on the problem PC appeared to be identical to those on the
other PCs, I deleted the 3 'custom' reference files (required for a 3rd
party facility that has been written for ther mdb app) and replaced them
with copies of those on one of the other PCs. This had the effect that the
code got a bit further - before everything froze again!! The problem with
everything freezing is that I can't then select the Run menu - or anything
else - to try to do any debugging. Any suggestions gratefully received!

Thanks again
Les
 
C

Clifford Bass

Hi Leslie,

Perhaps something is missing related to those custom references, such
as a required DLL that they use. Can you uninstall and reinstall them?
Also, make sure the computer is fully up-to-date in terms of Windows and
Office service packs and patches. Also, if they are older custom references
and this is a new computer, it may be that some older version of some package
is needed.

Clifford Bass
 

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