I
illini_99
I am trying to make my database customize itself for individual users. I am
trying to make it so that the icon used for each user is custom to each user.
In my autoexec macro, I am executing the following function. For some
reason, this causes the database to not have exclusive access. If I open the
database holding the left shift key and bypassing the autoexec, everything is
fine. Help!
Function InitializeAppToUser() As Boolean
Const sROUTINE_NAME As String = "InitializeAppToUser"
On Error GoTo InitializeAppToUser_err:
InitializeAppToUser = False
Dim lsusername As String
Dim ls_UserIcon As String
Dim intX As Integer
Const DB_Text As Long = 10
lsusername = Environ$("username")
If Not GetUsersIcon(lsusername, ls_UserIcon) Then
End If
intX = AddAppProperty("AppIcon", DB_Text, ls_UserIcon)
CurrentDb.Properties("UseAppIconForFrmRpt") = 1
Application.RefreshTitleBar
InitializeAppToUser_Exit:
InitializeAppToUser = True
Exit Function
InitializeAppToUser_err:
InitializeAppToUser = False
Call MsgBox(Err.Description, , "Error")
End Function
trying to make it so that the icon used for each user is custom to each user.
In my autoexec macro, I am executing the following function. For some
reason, this causes the database to not have exclusive access. If I open the
database holding the left shift key and bypassing the autoexec, everything is
fine. Help!
Function InitializeAppToUser() As Boolean
Const sROUTINE_NAME As String = "InitializeAppToUser"
On Error GoTo InitializeAppToUser_err:
InitializeAppToUser = False
Dim lsusername As String
Dim ls_UserIcon As String
Dim intX As Integer
Const DB_Text As Long = 10
lsusername = Environ$("username")
If Not GetUsersIcon(lsusername, ls_UserIcon) Then
End If
intX = AddAppProperty("AppIcon", DB_Text, ls_UserIcon)
CurrentDb.Properties("UseAppIconForFrmRpt") = 1
Application.RefreshTitleBar
InitializeAppToUser_Exit:
InitializeAppToUser = True
Exit Function
InitializeAppToUser_err:
InitializeAppToUser = False
Call MsgBox(Err.Description, , "Error")
End Function