J
Jim
I am trying to convert a (very) old Access 2.0 application
to Access 2002. The former uses the following function
Declare Function GetPrivateProfileString Lib "Kernel"
(ByVal lpApplicationName As String, ByVal lpKeyName As
Any, ByVal lpDefault As String, ByVal lpReturnedString As
String, ByVal nSize As Integer, ByVal lpFileName As
String) As Integer
which is then called in various places throughout the
application eg
lpSection = "Options"
lpEntry = "SystemDB"
lpDefault = ""
Set dbCurrent = DBEngine.Workspaces(0).Databases(0)
GPPSReturnVal = GetPrivateProfileString(lpSection, ByVal
lpEntry, lpDefault, lpReturnVal, BUFSIZE, lpIniName)
The function doesn't exist in Access 2002. The first time
I ran it I got an error as the library KERNEL wasn't
found. I have tried replacing the Lib parameter with
Kernel32 but I still get an error.
I think the function returns the full pathname of the
database (which may be in a different location to the
front end database).
Any ideas?
to Access 2002. The former uses the following function
Declare Function GetPrivateProfileString Lib "Kernel"
(ByVal lpApplicationName As String, ByVal lpKeyName As
Any, ByVal lpDefault As String, ByVal lpReturnedString As
String, ByVal nSize As Integer, ByVal lpFileName As
String) As Integer
which is then called in various places throughout the
application eg
lpSection = "Options"
lpEntry = "SystemDB"
lpDefault = ""
Set dbCurrent = DBEngine.Workspaces(0).Databases(0)
GPPSReturnVal = GetPrivateProfileString(lpSection, ByVal
lpEntry, lpDefault, lpReturnVal, BUFSIZE, lpIniName)
The function doesn't exist in Access 2002. The first time
I ran it I got an error as the library KERNEL wasn't
found. I have tried replacing the Lib parameter with
Kernel32 but I still get an error.
I think the function returns the full pathname of the
database (which may be in a different location to the
front end database).
Any ideas?