Write to Lookup Table

  • Thread starter Thread starter Conner Stevens
  • Start date Start date
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.
 
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
 
Back
Top