Default value from a column in a combo box.

bill crumpton

Registered User.
Local time
Today, 01:00
Joined
Apr 20, 2000
Messages
105
I have a combo box [drugtype] that had (3) columns. On the same form I have a regular currency field that I would to auto populate with the value of the third column of the combo box [drugtype] when the field in [drugtype] cbo box is chosen. Please help.

BAC
 
You did not give us the name of the textbox where your currency field is bound to, so I'll use "txtCurrency" for the name in the example below. You need to use the After Update event of the combo box (drugtype) to populate the currency txtxbox:

Private Sub drugtype_AfterUpdate()
Me![txtCurrency] = Me![drugtype].Column(2)
End Sub

Notice that I use "Column(2)" in the code above. This is actually the third column in the Record Source of the combo box, the first column is "Column(0)".

HTH
RDH

[This message has been edited by R. Hicks (edited 10-07-2000).]
 
Thanks RHicks. Worked like a charm.

BAC
 

Users who are viewing this thread

Back
Top Bottom