I know nothing about Novell or dll, And need something from it.
I need to change the following dll file name to the one that returns the username of the novell user,not windows login. I understand that "advapi32.dll" does that but for both kind of logins.
I got from ACCESS forum the following code, SO I will be able to set the initial form in MS-ACCESS certain database, according to the Novell username.
I.e. - A certain user will see a form as the initial, and another specific user will see b form as initial. Of course all forms are alredy there. The code:
Create an Autoexec macro and run the following code substituting the user and form names;
---------------------------------------------------------
Option Compare Database
Option Explicit
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long
Function Startup_Form()
Dim sBuffer As String
Dim gUser As Variant
Dim lSize As Long
sBuffer = Space$(255)
lSize = Len(sBuffer)
Call GetUserName(sBuffer, lSize)
gUser = Left$(sBuffer, lSize)
If gUser = "user1" Then
DoCmd.OpenForm "frmUser1"
ElseIf gUser = "user2" Then
DoCmd.OpenForm "frmUser2"
Else
DoCmd.OpenForm "frmOtherUsers"
End If
End Function
-------------------------
The forum I asked my question and explained all is in the following thread:
thread705-107463 in advance
I need to change the following dll file name to the one that returns the username of the novell user,not windows login. I understand that "advapi32.dll" does that but for both kind of logins.
I got from ACCESS forum the following code, SO I will be able to set the initial form in MS-ACCESS certain database, according to the Novell username.
I.e. - A certain user will see a form as the initial, and another specific user will see b form as initial. Of course all forms are alredy there. The code:
Create an Autoexec macro and run the following code substituting the user and form names;
---------------------------------------------------------
Option Compare Database
Option Explicit
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long
Function Startup_Form()
Dim sBuffer As String
Dim gUser As Variant
Dim lSize As Long
sBuffer = Space$(255)
lSize = Len(sBuffer)
Call GetUserName(sBuffer, lSize)
gUser = Left$(sBuffer, lSize)
If gUser = "user1" Then
DoCmd.OpenForm "frmUser1"
ElseIf gUser = "user2" Then
DoCmd.OpenForm "frmUser2"
Else
DoCmd.OpenForm "frmOtherUsers"
End If
End Function
-------------------------
The forum I asked my question and explained all is in the following thread:
thread705-107463 in advance