DoCmd.openform "FormWontOpen" (1 Viewer)

WhySoBad

New member
Local time
Tomorrow, 08:41
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?
 

June7

AWF VIP
Local time
Today, 14:41
Joined
Mar 9, 2014
Messages
5,465
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:41
Joined
May 7, 2009
Messages
19,231
not sure if this is a case of corruption.
can you import all object to a new db?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:41
Joined
Feb 28, 2001
Messages
27,138
When you attempt to open the form with the appropriate DoCmd action, is there an error message? If so, what is it?
 

WhySoBad

New member
Local time
Tomorrow, 08:41
Joined
Apr 30, 2022
Messages
7
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.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:41
Joined
Feb 19, 2013
Messages
16,607
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:

Mike Krailo

Well-known member
Local time
Today, 18:41
Joined
Mar 28, 2020
Messages
1,037
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

Top Bottom