DoCmd.openform "FormWontOpen"

WhySoBad

New member
Local time
Tomorrow, 04:09
Joined
Apr 30, 2022
Messages
7
I can open 48 of my 50 forms using 'DoCmd.OpenForm', but it refuses to open 2 of my forms.
However, I can open the 2 forms no problem at all using 'OpenForm' embedded macro, and even with a "where condition" included.
WTH?
 
Are you saying forms won't open directly from Navigation Pane or VBA fails? If you want to provide db for analysis, follow instructions at bottom of my post.
 
not sure if this is a case of corruption.
can you import all object to a new db?
 
When you attempt to open the form with the appropriate DoCmd action, is there an error message? If so, what is it?
 
When you attempt to open the form with the appropriate DoCmd action, is there an error message? If so, what is it?
No error messages. But do get error messages when I deliberately fault the code line to force an error.
 
Not a simple case of a typo in the form name? Or opening hidden?

what happens if you step through the code -does it just pass over the line? Or what?

and have you turned off warnings? If so turn them on again until problem is resolved
 
Last edited:
Is this a popup type of form? I've seen them open outside of the application window and not be visible on screen. If it is a popup, try going back to a regular form so it is forced to open inside the application window. You can also test opening the form from the immediate window directly.
 

Users who are viewing this thread

Back
Top Bottom