Combo Box

KabirPatel

Registered User.
Local time
Today, 14:46
Joined
Nov 16, 2006
Messages
38
Hi all,

I have a combo box that is bound to a stored procedure. The stored procedure returns values from 2 columns of a table, FieldA and FieldB.

I need end users to see values from FieldA only (so FieldB needs to be hidden). At the same time I need the values from FieldB for other forms within my application.

Is there a way to do this in Access?

I have been playing around with the properties of a combo box in VBA but cannot get it to work.

Thanks in advance
Kabir
 
Look at "column widths" in your combobox properties.
 
The two properties you want to look at are, as CEH said, "Column Widths", as well as "Bound Column".
Column Widths defines how wide the columns are and can be found on the 'layout' tab. They are ordered sequentially and seperated by a semi-colon. If you set a column width of 0, it will not display that column.
Bound Column refers to the column you would like to store for reference and can be found on the 'Data' tab. Setting it to 1 stores the first column, 2 stores the second column, etc.
If you want to refer to a specific column in VBA code, you would use [fieldname].column(<columnnumber>). Keep in mind, the .column property begins numbering at 0 (whereas the Bound Column begins at 1).
 
Last edited:

Users who are viewing this thread

Back
Top Bottom