How To Troubleshoot Collaboration Apps for the Modern Connected Worker
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
1. OptionCompare Database
Private intLogonAttemptsAsInteger
Private Subcbonama_Click()
End Sub
Private SubcmdExit_Click()
DoCmd.Quit
End Sub
Private Subcmdlogin_Click()
'Checkto see if data isenteredintothe UserName combobox
If IsNull(Me.cbonama) OrMe.cbonama= "" Then
MsgBox "You must entera UserName.",vbOKOnly,"RequiredData"
Me.cbonama.SetFocus
ExitSub
End If
'Checkto see if data isenteredintothe passwordbox
If IsNull(Me.Txtpass) OrMe.Txtpass="" Then
MsgBox "You must entera Password.",vbOKOnly,"RequiredData"
2. Me.Txtpass.SetFocus
ExitSub
End If
'Checkvalue of passwordintblEmployeestosee if thismatchesvalue chosenincombobox
If Me.Txtpass.Value =DLookup("pwd","pekerja","[ID]="&Me.cbonama.Value) Then
MyID = Me.cbonama.Value
'Close logonformandopensplashscreen
DoCmd.Close acForm,"form1",acSaveNo
DoCmd.OpenForm"utama"
Else
MsgBox "PasswordInvalid. Please TryAgain",vbCritical +vbOKOnly,"InvalidEntry!"
Me.Txtpass.SetFocus
End If
'If User Entersincorrectpassword3 timesdatabase will shutdown
intLogonAttempts=intLogonAttempts+1
If intLogonAttempts>3 Then
MsgBox "You do nothave access to thisdatabase. Please contactyoursystemadministrator.",
vbCritical,"RestrictedAccess!"