Write to Lookup Table

C

Conner Stevens

I have a form (frmDataEntry) that has a combo box. The combo box pulls its
info from tlkpPhysName. tlkpPhysName has 3 fields lngPhysKey which is an
autonumber key and strLastName and strFirstName. When the user makes a
selection only the lngPhysKey (autonumber) value is saved to the table
(tblAdmDis) in field lngPhysName.

My question is this, I would like for the user to be able to add names from
the form and also save them to the lookup table. I've seen code that does
this, but not with 3 fields and an autonumber field.

Any suggestions?


Thanks.
 
E

Emilia Maxim

Conner Stevens said:
I have a form (frmDataEntry) that has a combo box. The combo box pulls its
info from tlkpPhysName. tlkpPhysName has 3 fields lngPhysKey which is an
autonumber key and strLastName and strFirstName. When the user makes a
selection only the lngPhysKey (autonumber) value is saved to the table
(tblAdmDis) in field lngPhysName.

My question is this, I would like for the user to be able to add names from
the form and also save them to the lookup table. I've seen code that does
this, but not with 3 fields and an autonumber field.

Conner,

you would need a bound small popup form with DataEntry set to Yes to
enter first and last name. Access takes care of the autonumber.

The NotInList event procedure would open this form in dialog mode
instead of opening a recordset and adding the record behind the stage.

I guess there is some example either in the Help (NotInList event) or
in Northwind.

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 

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