Alert User

  • Thread starter Thread starter Colleen
  • Start date Start date
C

Colleen

I have a form that is used to enter employee
information. Name, address, age, hire date, etc. What's
happening is: When a new employee starts, someone may
enter the employee data into the main form and not add
the employee name to the Employee Name table. Therefore,
the record will be "unmatched" - How can I set it up so
in the event that someone doesn't enter the employee name
into the employee table - when they attempt to enter
their name into the main form, they are alerted to
contact the administrator to enter the new employees name.
I hope I am giving the proper information and enough
information.

Thank you
 
Hi, Colleen.

I always use a combo box for this situation that gets its rows from the
"lookup" table. Set the combo box' Limit to List property to Yes. If a user
enters a name that doesn't yet exist, the OnNotInList event triggers. You
can then display a helpful message.

Private Sub Combo1_NotInList(NewData As String, Response As Integer)
MsgBox "This name does not yet exist in the Employees table. Please
contact your administrator."
Response = acDataErrContinue
End Sub


HTH
Sprinks
 
Thank you for your help
-----Original Message-----
Hi, Colleen.

I always use a combo box for this situation that gets its rows from the
"lookup" table. Set the combo box' Limit to List property to Yes. If a user
enters a name that doesn't yet exist, the OnNotInList event triggers. You
can then display a helpful message.

Private Sub Combo1_NotInList(NewData As String, Response As Integer)
MsgBox "This name does not yet exist in the Employees table. Please
contact your administrator."
Response = acDataErrContinue
End Sub


HTH
Sprinks


.
 
Back
Top