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
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