While running my Access application, I receive a Error 53 File Not Found error.
The file in the error message refers to a referenced library for the application.
I refer to the library in my code like so...
Private Declare PtrSafe Sub ControlUnlockT Lib "Accusoft.TwainPro9.ActiveX.dll" Alias "PS_Unlock" _
(ByVal pw1 As LongPtr, ByVal pw2 As LongPtr, ByVal pw3 As LongPtr, ByVal pw4 As LongPtr)
And use the declared subroutine in the following function:
Public Function StartupSettings()
On Error GoTo Error_StartupSettings
'Hide menubars
'When used with the Application object,
'the MenuBar property enables you to display a custom menu bar
'throughout the database. However, if you've set the MenuBar
'property for a form or report in the database, the custom menu
'bar of the form or report will be displayed in place of the database's
'custom menu bar whenever the form or report has the focus.
'When the form or report loses the focus, the custom menu bar for the
'database is displayed.
'Application.MenuBar = "mcrBlankMenuBar"
ControlUnlockT DLookup("Code", "tblSecurity", "Section=1"), DLookup("Code", "tblSecurity", "Section=2"), _
DLookup("Code", "tblSecurity", "Section=3"), DLookup("Code", "tblSecurity", "Section=4")
ControlUnlock DLookup("Code", "tblSecurity", "Section=1"), DLookup("Code", "tblSecurity", "Section=2"), _
DLookup("Code", "tblSecurity", "Section=3"), DLookup("Code", "tblSecurity", "Section=4")
'Change the keyboard Move After Enter behavior to Next Field rather
'then next record or dont move
Application.SetOption "Move After Enter", 1
'Hide database window
DoCmd.Echo False
'DoCmd.SelectObject A_MACRO, "mcrOpenMDB2", True
'DoCmd.DoMenuItem 1, 4, 3, , A_MENU_VER20
DoCmd.Echo True
Exit_StartupSettings:
Exit Function
Error_StartupSettings:
MsgBox Err.Description, 16, "Error " & Err & " - StartupSettings"
Resume Exit_StartupSettings
End Function
The file exists in the path, so what am I missing here?