Does adhOfficeGetFileName knows only English?

naverty

Registered User.
Local time
Today, 18:47
Joined
Dec 1, 2004
Messages
10
I use the adhOfficeGetFileName function in a MS Access application to allow the user to browse for a file.

This works fine, except for filenames with accents on characters, f.i. with ‘ź’ in it. The function then returns the filename with a question mark on the place of the character with the accent.

Is there a solution for this?
 
The adh prefix probably referes to Access Developers Handbook (Ken Getz et al). Do you have the source for the function? Does it restrict to a specific language or character set or code page???
You may be able to modify the function to meet your needs. I'm not familiar with the function per se, nor internationalizing such code, but other posters may be.

Good luck.
 
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
 

Users who are viewing this thread

Back
Top Bottom