Create Login Form Access Database with VBA Code.
If You want Code I am writing in the below
good Luck
Option Compare Database
Private Sub Command6_Click()
If IsNull(Me.Text2) Then
MsgBox "Please Write Username", vbInformation, "Write Username Required"
Me.Text2.SetFocus
ElseIf IsNull(Me.Text4) Then
MsgBox "Please Write Password Number", vbInformation, "Password Number Required"
Me.Text2.SetFocus
Else
If (IsNull(DLookup("Username", "LoginTB", "Username= '" & Me.Text2.Value & "'"))) And (IsNull(DLookup("password", "LoginTB", "password='" & Me.Text2.Value & "'"))) Then
MsgBox "Enter correct username And password", vbInformation, "username And password"
Me.Text2.Value = ""
Me.Text4.Value = ""
Me.Text2.SetFocus
Else
DoCmd.Close
DoCmd.OpenForm "Main Form"
End If
End If
End Sub
Private Sub Command7_Click()
DoCmd.Quit
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize
End Sub
Ещё видео!