I have searched every nook and cranny and found no solutions for this problem…
My database hides the access window so it resembles a standalone application. I’m not sure if someone screwed with something, but today I noticed an error while opening the database.
Error #: 2475
You entered an expression that requires a form to be the active window.
I have used this database for years now and today is the first time I have encountered this error. I also have other databases which use this function to hide the access window. None of them encounter this problem when opened.
When I click debug, I’m directed to this function. And the below line is highlighted to yellow.
Function fSetAccessWindow(nCmdShow As Long)
Dim loX As Long
Dim loForm As Form
On Error Resume Next
Set loForm = Screen.ActiveForm
If Err <> 0 Then
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If
EDIT:
I opened this database on two different PCs. Both are loading the main form with no errors. So the problem is isolated to this machine. Now if I can find out why…
EDIT # 2:
I cannot find the culprit. As I mentioned already, the database is loading fine on every machine except for the main workstation. Which I have used for years now...
I also receive this error when I open any database that hides the access window. So something was changed in the settings…
This is strange as hell and I’m lost for ideas. This is what I have tried so far
Updated to Office 2003 w/ SP 3 – no help
Reinstalled MS Access – No Help
Set a 5 second timer to hide the access window once the form is loaded – no help
Checked my references (tools -> references) Nothing is labeled as “missing”
Access still complains about my main form not being an “active window”. I also noticed my custom error messages have vanished. When I encounter an error I get the “debug” dialog box. No custom message boxes.
Again, this problem is only with the main workstation. All my other machines load the database just fine with no errors.
My database hides the access window so it resembles a standalone application. I’m not sure if someone screwed with something, but today I noticed an error while opening the database.
Error #: 2475
You entered an expression that requires a form to be the active window.
I have used this database for years now and today is the first time I have encountered this error. I also have other databases which use this function to hide the access window. None of them encounter this problem when opened.
When I click debug, I’m directed to this function. And the below line is highlighted to yellow.
Function fSetAccessWindow(nCmdShow As Long)
Dim loX As Long
Dim loForm As Form
On Error Resume Next
Set loForm = Screen.ActiveForm
If Err <> 0 Then
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If
EDIT:
I opened this database on two different PCs. Both are loading the main form with no errors. So the problem is isolated to this machine. Now if I can find out why…
EDIT # 2:
I cannot find the culprit. As I mentioned already, the database is loading fine on every machine except for the main workstation. Which I have used for years now...
I also receive this error when I open any database that hides the access window. So something was changed in the settings…
This is strange as hell and I’m lost for ideas. This is what I have tried so far
Updated to Office 2003 w/ SP 3 – no help
Reinstalled MS Access – No Help
Set a 5 second timer to hide the access window once the form is loaded – no help
Checked my references (tools -> references) Nothing is labeled as “missing”
Access still complains about my main form not being an “active window”. I also noticed my custom error messages have vanished. When I encounter an error I get the “debug” dialog box. No custom message boxes.
Again, this problem is only with the main workstation. All my other machines load the database just fine with no errors.
Last edited: