combo box help

G

Guest

i have a form that have a combo box. when i select the part from the combo
box then i want it auto to fill the following two fill which is text box. i
have put the code as below

Private Sub Part_code_AfterUpdate()

Me.PART_NAME = Me.Part_code.Column(2)
Me.PARTNO = Me.Part_code.Column(1)


End Sub

in the Part Code after update event. Part_code is my combo box. but when i
click the part from the combo box, then the first text box (Part Name) wont
be fill in but the Part no will. wat is the problems? can anybody help me?
thanks!
 
J

J. Goddard

Hi -

The first column in a combo box is Me.Part_code.Column(0), the second is
Me.Part_code.Column(1)

John
 
G

Guest

thanks! my combo box hav 3 column that is part code, part no and part name.
now i'm select the paprt code, and i want the part no and part name from the
combo box wil automatically show in the part no and part name which is text
box. so i put the code as above. but it jus wil come out the part name. the
part was blank. y? but when i'm click to select new part for new record (it
is continuous form) then the part no, jus wil be coming out. y? can help me?
thanks!
 
J

J. Goddard

Hi -

What is the row source of your combo box? Are you selecting three fields
for each row?

John
 
G

Guest

my row source is from a table, that have part code, part no and part name.
once i select part code which is combo box, then i want the part no and part
name wil auto fill in the text box which is part no and part name. can u help
me? thanks!
 

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

Top