how do i get a combo box to write the selected text to another fie

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a table which lists pieces of equipment by manufacturer

tblManufacturer has a one-to-many relationship with tblEquipment

on frmEquipment i have a combo box, cboManuf, which selects Manufacturers
from tblManufacturer and then writes the ManufacturerID (a number) into
tblEquipment. This works fine. I would also like to write the actual text of
the Manufacturer name into tblEquipment, into the ManufactureName field in
tblEquipment, and for the life of me, I cannot figure out how to do this. I
have sifted through Access Bible to no avail. Any suggestions would be
greatly appreciated

thanks!
 
Don't write the Manufacturer name into tblEquipment, there is no need to save
data in a table when it already exist in another

1. You can always retrieve the name from tblManufacturer using a query,
dlookup ...
2. If there will be a need to change the name of the Manufacturer for some
reason, you'll need to update tblEquipment and not only tblManufacturer,
there will be another table you'll need to maintain
 
Zawanda,
It's not necessary to "save" the manufacturer's name, but it is OK to
"display" it.
Never save a value that can be re-determined (calcualted) from the data
already svaed.

Add the ManufactiurersFullName to your combo box (example in column 1...
combo columns are numbered 0,1,2,3....)
Like so....
ManufacturerID ManufacturersName

Place an unbound text control on the form with a ControlSource of... (use
your object names)
= cboManufacturer.Column(1)

cboManufacturuer will display the Manufacturers name, and the textbox
will always show the associated ManufacturerFullName.

Because you capture the ManufacturerID, you can always relink to your
tblManufacturers to determine the Manufacturer's fullname, in any subsequent
query, form, or report.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 
Thank you very much!

Zawanda,
It's not necessary to "save" the manufacturer's name, but it is OK to
"display" it.
Never save a value that can be re-determined (calcualted) from the data
already svaed.

Add the ManufactiurersFullName to your combo box (example in column 1...
combo columns are numbered 0,1,2,3....)
Like so....
ManufacturerID ManufacturersName

Place an unbound text control on the form with a ControlSource of... (use
your object names)
= cboManufacturer.Column(1)

cboManufacturuer will display the Manufacturers name, and the textbox
will always show the associated ManufacturerFullName.

Because you capture the ManufacturerID, you can always relink to your
tblManufacturers to determine the Manufacturer's fullname, in any subsequent
query, form, or report.
--
hth
Al Campagna
Microsoft Access MVPhttp://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 
Back
Top