Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use 2 values from row in Combo box 1

Status
Not open for further replies.

cdgeer

IS-IT--Management
Apr 8, 2008
133
US
I have a form with a drop down Combo box (based on a simple look up table). How would I get the values from 2 columns in one selected Row in the drop down to be saved into 2 separate columns of the table that is the control source of the form?
Thanks for any suggestions
 
Something along these lines: (general approach)

to refer to the second column of the combo box
Me.Combo2.Column(1)

Note that combo box columns are 0 based.

Me.Combo2.Column(2) is third column of combo box

I'd suggest something in the after update event of the combo

To Update the record in the table:
UPDATE MyTable
SET MyFirstField = Me.Combo2.Column(1)
,MySecondField = Me.Combo2.Column(2)
Where KeyField = me.combo2.column(0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top