Error 2450: Cannot reference form (1 Viewer)

access7

Registered User.
Local time
Today, 20:41
Joined
Mar 15, 2011
Messages
172
Good Morning

I am hoping someone may be able to help with the following...

I have a requery on a subform that in certain situations is trying to run after the form has been closed. Giving me the error that 'Access cannot find the referenced form'. I have attempted to solve this by adding the following if clause:

If Forms!frm_company.IsLoaded Then

Forms!frm_company!SubFrm_Amendments.Requery

End If

However, it is still giving me the same error on the first line... is there anything else I can try?? :confused:
 

pr2-eugin

Super Moderator
Local time
Today, 20:41
Joined
Nov 30, 2011
Messages
8,494
Hi.. I use a different way to check if a Form is loaded or not.. try this..
Code:
CurrentProject.AllForms("frm_company").IsLoaded
 

access7

Registered User.
Local time
Today, 20:41
Joined
Mar 15, 2011
Messages
172
I'm hoping that has done the trick - I'm not getting the message now, or so it would seem. A little hard to tell 100% at the moment as it was sporadic to begin with but I'm keeping my fingers crossed.

Thanks for that! :-D
 

access7

Registered User.
Local time
Today, 20:41
Joined
Mar 15, 2011
Messages
172
I'm hoping that has done the trick - I'm not getting the message now, or so it would seem. A little hard to tell 100% at the moment as it was sporadic to begin with but I'm keeping my fingers crossed.

Thanks for that! :-D
 

pr2-eugin

Super Moderator
Local time
Today, 20:41
Joined
Nov 30, 2011
Messages
8,494
No problemo.. Please post back if you have troubles.. or if it is sorted out..
 

Users who are viewing this thread

Top Bottom