Alert User

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
 
G

Guest

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
 
C

Colleen

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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top