Error 2467 .. object ... doesn't exist - how to check?
I'm getting R/T Error 2467 "The expression you entered refers to an object that is closed or doesn't exist."
Yes, I know what that means.
But ... how do I check for that before it blows up?
The following code shows attempts to do so. None worked; anyone any ideas?
' original code
If (Form_subMyForm.Visible = True) Then
' attempts to fix by prequalifying that object exists
'If (Form_subBiddersList Is Nothing) Then
'If (Form_subBiddersList = Nothing) Then
'If (Form_subBiddersList Is Null) Then
'If (Form_subBiddersList = Null) Then
'If (IsNull(Form_subBiddersList)) Then
'If (IsEmpty(Form_subBiddersList)) Then
'If (Form_subBiddersList = Empty) Then
'If (Nz(Form_subBiddersList.Visible) = 0) Then
Some way to check for an uninitialised/closed variable/form would be appreciated.
PS BTW This is a very large app that I've been asked to fix up; saying something trite like 'initialise the variable before use' is NOT an option.