Inconsistant behaviour

  • Thread starter Thread starter Jonathan Parminter
  • Start date Start date
J

Jonathan Parminter

Hi, I have a simple application that is installed on
several PCs. On all but 2 the code associated with form
controls - any form - work as designed. However, on these
2 - one is win98, the other is winME - the application
startup code runs. But the code associated with controls
don't.

My app is in Access 2002.

What makes it doubly hard to debug is that the app is
using access runtime so I don't know how to run in break
mode, hence the use of message boxes

For example the following is for a command button...

Private Sub cmdClose_Click()
On Error GoTo cmdClose_Click_Err

MsgBox "Clicked Close"
If chkAccepted = False Then
Call QuitDB
End If

DoCmd.Close

cmdClose_Click_Exit:
On Error GoTo 0
Exit Sub
cmdClose_Click_Err:
MsgBox "Error: " & Err.Description, , "cmdClose_Click"
Resume cmdClose_Click_Exit
End Sub


.... when clicked the message is not displayed. But when
the form close button is clicked the following does run...

Private Sub Form_Close()
On Error GoTo Form_Close_Err

MsgBox "Form Close"
If chkAccepted = False Then
cmdClose_Click
End If

Form_Close_Exit:
On Error GoTo 0
Exit Sub
Form_Close_Err:
MsgBox "Error: " & Err.Description, , "Form_Close"
Resume Form_Close_Exit
End Sub

.... as the above is calling the first example code I know
that the code will work. So the problem seems to be that
control events such as _AfterUpdate() and _Click() don't
run. But form events such as _OnLoad() and _Close() do run.

Why is this and, more importantly, how do I fix this?

Cheers
Jonathan
 
Sounds like a references problem to me.

The first thing I'd do would be to look under Tools - References from the
code window of your development machine and get a list of the references
which are checked.
Then I'd go over to the noncompliant machines and check that all of those
references exist.
Supply and register any missing ones, and your problem may be solved.

I think there is little to be gained by trying to figure out why some
libraries load and some don't.

HTH
- Turtle
 
Hi HTH,

I thought that the Deployment Packaging Wizard took care
of references? The only reference that is missing from
noncompliant machines in Microsoft Office 10 Object
Library.

Do I simply add this Mso.dll to the files listed with the
application and install to the same location as sourced
from?

Thanks
Jonathan
 
If there is no reference available to the Microsoft Office 10 Object
Library, this means that Office 10 is not installed on the target PC.
It is definitely NOT OK to distribute this library with your application;
you need to purchase and install this product.

HTH
- Turtle
 
Back
Top