D
Diogo
Hi. I'm using the following code to see if a worker is in its vacation
period, preventing him from logging in to the data base.
'Check to see if User is in vacation period
If Me.cboEmployee.SelText = DLookup("Name", "tblVacations") And
DateValue(Now()) = DateValue(DLookup("Date", " tblVacations ")) Then
MsgBox "Worker on Vacations", 48, "Vacations Period."
Exit Sub
End If
If the user name and the corresponding date field correspond to the
criteria the login is prevented.
What I'm I doing wrong?
Please help.
Thanks.
period, preventing him from logging in to the data base.
'Check to see if User is in vacation period
If Me.cboEmployee.SelText = DLookup("Name", "tblVacations") And
DateValue(Now()) = DateValue(DLookup("Date", " tblVacations ")) Then
MsgBox "Worker on Vacations", 48, "Vacations Period."
Exit Sub
End If
If the user name and the corresponding date field correspond to the
criteria the login is prevented.
What I'm I doing wrong?
Please help.
Thanks.