SimonSellick
Programmer
Hi,
A few threads have this error number but none seems to address the same issue.
The process runs as an event handler on a form. It opens a dialog form (a progress bar mostly) then when it completes, closes the dialog form and writes a completion message to a label on the calling form, which is still open.
All is well unless I change focus away from Access during the process. In that event, the attempt to write the completion message fails with the error 2467 and the message 'The expression you entered refers to an object that is closed or doesn't exist.'
The statement that fails is simple:
If I debug when it has failed, the immediate window shows that the calling form is available as 'Me' and shows its controls and properties, but it can't actually get at them - an attempt to print one repeats the error.
Any ideas, anyone?
A few threads have this error number but none seems to address the same issue.
The process runs as an event handler on a form. It opens a dialog form (a progress bar mostly) then when it completes, closes the dialog form and writes a completion message to a label on the calling form, which is still open.
All is well unless I change focus away from Access during the process. In that event, the attempt to write the completion message fails with the error 2467 and the message 'The expression you entered refers to an object that is closed or doesn't exist.'
The statement that fails is simple:
Code:
Private Sub Status(s As String)
[red]lblStatus.Caption = s[/red]
End Sub
Any ideas, anyone?