txtDescription = dlookup("Description", "tblParts", "[PartNo] = ' " &
txtPartNo & " ' ")
This is the code I'm using. It is in the "after Update" on the "partNmbr"
box on the form.
Now I'm getting "The expression After Update that you entered as the
event
property setting produced the following error: The object doesn't contain
the automation object 'textDescription'
Dale Fye said:
Actually, he will need to remove the added space between the single and
double quotes before and after the reference to txtPartNo as well.
Dale
--
Don''t forget to rate the post if it was helpful!
Email address is not valid.
Please reply to newsgroup only.
Stuart McCall said:
Guess I should have been clearer.. I want the "Description" in the
description filed while keeping the part Number in the "part Number"
field
:
Im building a form and in the subform I want a "description" field
to
be
populated when I enter a "Part Number" in the field before it. I
have
a
separate table listing part numbers and their descriptions. It's
been
a
while and my memory is a bit rusty. Im working in Access 2000.
Thanx for your help
Tom
You could put a dlookup( ) in the afterUpdate event of the Part
Number
textbox/comboBox.
txtDescription = dlookup( "tblParts","Description","[PartNo] = ' " &
txtPartNo & " ' ")
OldPro's solution will work, so long as you pass the arguments in the
right
order. Instead of:
txtDescription = dlookup( "tblParts","Description","[PartNo] = ' " &
txtPartNo & " ' ")
use this:
txtDescription = dlookup("Description", "tblParts", "[PartNo] = ' " &
txtPartNo & " ' ")