Populate textbox form selection on combo box

E

Esrei

Hi

I am new to code

I have a query that a unbound combo box is bassed on. The 4th colunm is the
Ingredient ID that I would like to write to textbox Ingredient_Id

I have tried Tom Lake's sugestion

Private Sub Combo12_AfterUpdate()
Me![Ingredient_Id] = Me![Combo12].Column3
End Sub

But I get Object doesn't support this porperty or method, and I do not
understand what it means.

What does the "me" mean?

Thank you

Esrei
 
S

scubadiver

"Me!" refers to the form in which the code is being written and I don't
think it is really necessary.

I think it should be:

[Ingredient_Id] = [Combo12].Column(3)
 
S

Steve

You need parantheses around the 3 in your code:
Me![Ingredient_Id] = Me![Combo12].Column(3 )

"Me" is a shortcut reference to the form that contains the code.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 

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