Forms combo box referencing

C

cwatchowski

I am trying to write a VBA module to access the values I have stored i
combo boxes. I have several combo boxes on the form with multipl
fields in each combo box, but display a list of only one field in each
The user then selects a value for each combo box. After he is done h
clicks on an "UPDATE" button which in turn runs a VBA program. In thi
program, I want to be able to select fields in the boxes (no
necessarily the ones that are displayed) and write them to a .txt fil
and start a VBScript program which will use this .txt file. I have
reference book for VBA but when I try to code my references to th
fields in the combo boxes accordingly, nothing happens. I need to b
able to tell it which form, combo box and field to access. My curren
code is as foillows:
ArgLine = Me.Form.Box.Field

I have been wrestling with this for 2 days now and really need som
help. Thanks in advance to anyone who can shed some light for me
 
B

Brendan Reynolds

Sounds like you may be looking for the Column property of the combo box
control. It's zero-based, so Me.NameOfCombo.Column(0) returns the value of
the first column, Me.NameOfCombo.Column(1) returns the value of the second
column, etc.
 
Top