Borrowing code from a Access DB I developed some time back, I'm trying to allow users to select the directory where the file for import resides. In my old DB, it still works fine. However, in my new DB, I get a COMPILE ERROR (included in the title). I have gone through and verified References, and all are identical in both DBs. Can anyone tell me why, when I try to DIM a variable, adh_accOfficeGetFileNameIn
fo will not show as one of my choices, while it does in my old DB? And a recommended course of action? Any assistance would be greatly appreciated. Thanks in advance.
Public Function gfni_getFile()
Dim gfni As adh_accOfficeGetFileNameInfo
.hwndOwner = Application.hWndAccessApp
.strAppName = "Select Location of File for Import"
.strDlgTitle = "Select Location of File For Import"
.strOpenTitle = "Select"
.strfile = "*.mdb"
.strInitialDir = "\\server\directory\folder"
.strFilter = "Access Database (*.mdb)|All Files (*.*)|Excel Spreadsheet (*.xls)"
.lngFilterIndex = 1
.lngView = adhcGfniViewList
.lngFlags = adhcGfniNoChangeDir Or adhcGfniInitializeView
If adhOfficeGetFileName(gfni, True) = adhcAccErrSuccess Then
gfni_getMTOE = Trim(gfni.strfile)