Time to update David's "PasswordLogin.mdb" ? (1 Viewer)

mrcunknown

Registered User.
Local time
Today, 16:56
Joined
Apr 10, 2018
Messages
10
Hi all, I realy like this login! But is this also working with multi level? I looking for a good login system that has 5 different levels/roles
 

isladogs

MVP / VIP
Local time
Today, 23:56
Joined
Jan 14, 2017
Messages
18,186

mrcunknown

Registered User.
Local time
Today, 16:56
Joined
Apr 10, 2018
Messages
10
Thnx for youre reaction.



Regarding access im a noob :) I have seen the 1,2,3 levels .... but i dont know how i can use this in the forms that i want to use. every level redirect to frmSessions.
 

isladogs

MVP / VIP
Local time
Today, 23:56
Joined
Jan 14, 2017
Messages
18,186
With respect, this isn't really a beginners level project as the logic can get quite complex.
However, giving examples of doing that is going to be part of the enhanced version.
 

mrcunknown

Registered User.
Local time
Today, 16:56
Joined
Apr 10, 2018
Messages
10
thnx for youre advice. I'm looking forward to the enhanced version.
 

mrcunknown

Registered User.
Local time
Today, 16:56
Joined
Apr 10, 2018
Messages
10
I'f wanted to send you a DM but i'f first have to make 10 post :)
 

isladogs

MVP / VIP
Local time
Today, 23:56
Joined
Jan 14, 2017
Messages
18,186
Well you're almost there. If you email me using the link I'll let you know what features are planned and also when its ready.
 

mrcunknown

Registered User.
Local time
Today, 16:56
Joined
Apr 10, 2018
Messages
10
Youve have mail ... and i have my 10 post :p Thnx for the help
 

isladogs

MVP / VIP
Local time
Today, 23:56
Joined
Jan 14, 2017
Messages
18,186
Now everyone is happy! I'll reply to your email later today
 

Qunaki

New member
Local time
Tomorrow, 00:56
Joined
May 10, 2020
Messages
3
Old thread, but why not use... (I haven't looked into the newer solution):

Ok, but these sometimes get old (as seen here), and are much harder to use:
Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Declare Function GetComputerName Lib "Kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

So why not use the built in functions already in Access instead?
strUser = Environ("UserName")
strComputer =Environ("ComputerName")
I think they newer will expire, since they are MS-peoples concern/problem.

// Q
 

Isaac

Lifelong Learner
Local time
Today, 16:56
Joined
Mar 14, 2017
Messages
8,738
If I remember correctly, the environ() ones are easier to spoof?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 16:56
Joined
Oct 29, 2018
Messages
21,358
Old thread, but why not use... (I haven't looked into the newer solution):

Ok, but these sometimes get old (as seen here), and are much harder to use:
Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Declare Function GetComputerName Lib "Kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

So why not use the built in functions already in Access instead?
strUser = Environ("UserName")
strComputer =Environ("ComputerName")
I think they newer will expire, since they are MS-peoples concern/problem.

// Q
Hi. I also avoid using Environ() and prefer using this instead.
 

isladogs

MVP / VIP
Local time
Today, 23:56
Joined
Jan 14, 2017
Messages
18,186
Hi Qunaki
Perhaps you should have looked at the newer version first!
https://www.access-programmers.co.u...on-login-recording.193131/page-2#post-1670494

I never use the old GetUserName API.
Although it does work well it is unnecessarily complex and like all APIs it needs to be modified for 64-bit

Also, as Isaac mentioned Environ can easily be spoofed and is best avoided.

The best solution in my opinion is using WScript
Code:
GetUserName = CreateObject("WScript.Network").UserName
Code:
GetComputerName = CreateObject("WScript.Network").ComputerName

For more info, see my website articles: Get User Name & Get Computer Name

Nevertheless, there are many situations where relying on the network user name may not be sufficiently secure.
For example in schools, many staff may at different times use the same PC over the course of a day..
Therefore many apps require users to login and supply a password to prevent unauthorised access

This example is intended for use in such cases
 
Last edited:

Qunaki

New member
Local time
Tomorrow, 00:56
Joined
May 10, 2020
Messages
3
Thx for the update.
Becasue of our real sale system (bought, and payed for), and used daily. I'm too still using 2003, as they are. Then I've been stuck there...
I have for long time wanted to move further, but that have stopped me...
Yes I know, I have a lot to learn today to move further. But then the new AC Navigation Pane has always stopped me taking that leap (what a s..it it is, compared to the old one, as I see it).

// Q
 

Users who are viewing this thread

Top Bottom