I want to populate a description field based on a par number that is entered
in the field before it. In other owrds, you enter a part number and presto,
in the next field, the description is entered for you.
Can you help??
Thanx
Tom
If you're trying to copy the description field from the Parts table into a
redundant Description field in some other table... DON'T. Redundancy is
redundant and causes redundancy, so it's generally a Bad Thing.
You can *display* the description a couple of ways. If it's a Text field, just
include it in a Combo Box's rowsource; use the combo to select the part number
on your Form, and set the control source of a textbox on the form to
=comboboxname.Column(n)
where n is the zero based index of the description field in the combo's query.
Or, if it's a Memo field (which won't fit in a combo box), set the control
source of a textbox to
=DLookUp("[Description]", "[tblParts]", "[PartNo] = " & comboboxname)
or if the part number is a Text field,
=DLookUp("[Description]", "[tblParts]", "[PartNo] = '" & comboboxname & "'")
where tblParts is the name of the parts table (change fieldnames as
appropriate as well).
If you're entering data directly in the table, don't. Table datasheets are of
VERY limited utility.
John W. Vinson [MVP]