how do I populate another field by selecting data in a combi box



I have a form with a subform attached. In the sub form I have:- Product Info
(combi Box), Unit/Metres Price (Text Box), Qty Used (Text box) and Total
(Text Box, with calculation). Product Info and Unit/Metres Price are also
used and populated in another Table. I can select data in the Product Info
field using the Combi Box, but I cant figure out how to automatically input
the Unit/Metres Price from the corrosponding field. Can you shed any light
on this. Please contact me on (e-mail address removed)

Douglas J. Steele

Assuming the information you want is available in the combo box (whether or
not the field is visible), you can put code in the combo box's AfterUpdate
event to put the value in the text box:

Private Sub MyComboBox_AfterUpdate()
Me.MyTextBox = Me.MyComboBox.Column(1)
End Sub

That'll put the value from the 2nd column of the combo box into the text box
(the Column collection starts counting at 0)

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