Log on form with User name and password

Rob Ross

Registered User.
Local time
Today, 09:16
Joined
May 24, 2012
Messages
28
I am looking for help with a login form with user name and password for access 2007. I found a nice example database that was using the CAPICOM.dll fro encryption but Windows 7 does not support CAPICOM. Does anyone have another example of know how to replace the CAPICOM in the present coding. I am fairly new to using the coding. Here is the example I am using:

Option Compare Database
Option Explicit
Public UserID As Long
Public Const FORM_CAPTION As String = "Logon System Demo"

Public Function Encrypt(ByVal str As String) As String
Encrypt = str
On Error Resume Next
Dim capHash As CAPICOM.HashedData
Set capHash = New CAPICOM.HashedData
With capHash
.Algorithm = CAPICOM_HASH_ALGORITHM_SHA1
.Hash str
Encrypt = .Value
End With
End Function
Public Function DBAdmin() As Boolean
DBAdmin = Nz(DLookup("DBAdmin", "tblUsers", "ID = " & UserID), False)
End Function

This was from the logonsystemdemo I found in sample databases.
 

Users who are viewing this thread

Back
Top Bottom