Having a " box" be automatically be filled when a combo is entered

J

Joe

I have a table called "Approved Supplier List" that has 3 fields:
"ID", "Supplier Name" and "Supplier Code". Currently I have two combo boxes
one for "Supplier Name" and "Supplier Code". When I start typing in each box
they auto fill. I would like when the "Supplier Name" is entered the
"Supplier Code" would fill in automatically.
I would figure the "Supplier Code" would be a text box
 
A

akphidelt

You need to create an after update event... then write

Something like this

Private Sub cboSupplierName_AfterUpdate()

Me.txtSupplierCode.Value = DLookup("[Supplier Code]", "[Approved Supplier
List]", "[Supplier Name]=forms!yourform!txtSupplierName")
 
J

Joe

where does this go? Does to go in "afterupdate" in the parameters? Does it go
in the supplier code box or the Supplier name box? do I type the "ME.TXT"



akphidelt said:
You need to create an after update event... then write

Something like this

Private Sub cboSupplierName_AfterUpdate()

Me.txtSupplierCode.Value = DLookup("[Supplier Code]", "[Approved Supplier
List]", "[Supplier Name]=forms!yourform!txtSupplierName")


Joe said:
I have a table called "Approved Supplier List" that has 3 fields:
"ID", "Supplier Name" and "Supplier Code". Currently I have two combo boxes
one for "Supplier Name" and "Supplier Code". When I start typing in each box
they auto fill. I would like when the "Supplier Name" is entered the
"Supplier Code" would fill in automatically.
I would figure the "Supplier Code" would be a text box
 

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

Similar Threads


Top