Not in List - add 2 fields to table

  • Thread starter szag via AccessMonster.com
  • Start date
S

szag via AccessMonster.com

I have a combo box that selects an employee name. If the employee name is Not
in List I want code to ask if the user if they wants to add the name. If "OK"
is selected I want:

1) The name to be added to the EMPLOYEE table, NAME field
Then
2) For the user to be prompted for an employee# (using an input box) which
after entered will add the employee # to the EMPLOYEE table, EmpNo field.

Any help? Thanks in advance...
 
A

Allen Browne

Here's a list of 4 alternatives you can use to add values to lookup tables:
http://allenbrowne.com/ser-27.html

I suggest you use one of the approaches other than NotInList.

BTW, if you have a field named Name, it will cause you grief. Many objects
in Access have a Name property, so in some contexts, Access will
misunderstand it (e.g. as the name of your form instead of the contents of
the name field.) Consider renaming it as EmployeeName or something.

Better still, split it into FirstName, Surname, etc, so you can more easily
and efficiently search for people.
 

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

Top