This is the function:
Public Function adhOfficeGetFileName( _
gfni As adh_accOfficeGetFileNameInfo, _
ByVal fOpen As Integer) As Long
' Use the Office file selector common dialog
' exposed by Access.
Dim lngReturn As Long
With gfni
.strAppName = RTrim$(.strAppName) & vbNullChar
.strDlgTitle = RTrim$(.strDlgTitle) & vbNullChar
.strOpenTitle = RTrim$(.strOpenTitle) & vbNullChar
.strFile = RTrim$(.strFile) & vbNullChar
.strInitialDir = RTrim$(.strInitialDir) & vbNullChar
If Len(adhTrimNull(RTrim$(.strFilter))) = 0 Then
.strFilter = "All Files (*.*)"
.lngFilterIndex = 1
End If
.strFilter = RTrim$(.strFilter) & vbNullChar
lngReturn = adh_accOfficeGetFileName(gfni, fOpen)
.strAppName = adhTrimNull(.strAppName)
.strDlgTitle = adhTrimNull(.strDlgTitle)
.strOpenTitle = adhTrimNull(.strOpenTitle)
.strFile = adhTrimNull(.strFile)
.strInitialDir = adhTrimNull(.strInitialDir)
.strFilter = adhTrimNull(.strFilter)
End With
adhOfficeGetFileName = lngReturn
End Function
gfni.strFile returns the name of the file the user browsed for, but it replaces the accented characters with a question mark.
adh_accOfficeGetFileName looks like this:
Private Declare Function adh_accOfficeGetFileName _
Lib "msaccess.exe" Alias "#56" _
(gfni As adh_accOfficeGetFileNameInfo, fOpen As Integer) As Long