Dat lukt me niet...
ik kan hem alsnog mailen... mijn mail is
r.volman@xs4all.nl mocht je jou mail adres niet openbaar willen zetten.
Mijn situatie is zo:
Op moment dat de database opent dan opent de login pop up. daarna sluit hij automatisch en word het navigatieformulier geopend. In dat navigatie formulier zit een vak txtUser. Daarin moet de inlog naam van de persoon die zojuist is ingelogd komen te staan.
Oke dat begrijp ik wat je zegt maar dat heb ik geprobeerd maar dan geeft hij een foutmelding
Private Sub cmdLogin_Click()
'Check to see if data is entered into the UserName combo box
If IsNull(Me.cboEmployee) Or Me.cboEmployee = "" Then
MsgBox "U moet een gebruikersnaam invoeren.", vbOKOnly, "Required Data"
Me.cboEmployee.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "U moet een wachtwoord invoeren.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
'Check value of password in tblEmployees to see if this
'matches value chosen in combo box
If Me.txtPassword.Value = DLookup("Password", "tblUser", "[UserID]=" & Me.cboEmployee.Value) Then
MyUserID = Me.cboEmployee.Value
'Close logon form an open splash screen
DoCmd.Close acForm, "Login", acSaveYes
DoCmd.OpenForm "Navigation_Form"
Option Compare Database
Option Explicit
Public strEmployee As String
Else
MsgBox "Ongeldig wachtwoord. Propeer opnieuw", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If
'If User Enters incorrect password 3 times database will shutdown
intLogonAttempts = intLogonAttempts + 1
If intLogonAttempts > 3 Then
MsgBox "U heeft geen toegang tot deze database.Contacteer ICT.", vbCritical, "Restricted Access!"
Application.Quit
End If
End Sub