Using unbound columns in Combo box

clare_voiant

Board Regular
Joined
Mar 20, 2002
Messages
76
Hi,

I have successfully (it took hours!) made my cascading combo boxes to filter data. I have used the bound column from the second combo box to fill data to a text box....

I wish to use the data on the same row of my query from my combo box to fill other text boxes, but I dont know how.

i.e.

column 1 - ID (bound Column)
column 2 - Description (not bound)

By using the bound the column and control source property I now have the ID in the correct text box, but i want to put the decription in a second text box (field).

I cant help thinking it cant be that hard, but its drving me mad....

Thanks in advance

Clare

:oops:
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
If I follow...

You could use a 2-column combo box (under format|column count), and then set the column widths (also under format) to 0" (Access will hide the first column if you do this, and it will make the second column as big as it needs to be), and make the combo bound to the ID field. The combo's rowsource should be the ID and then the description (as an SQL statement) from whatever table it's supposed to look at. This way, you see and choose a description, but the ID is what actually gets stored in the underlying table.
 
Upvote 0
Hi Clare,

some months ago I had the same problem ...

I also wanted to store both column-values into a table.

I have done following:

Dim a As String
Dim b As String

'VB always starts to count with 0, except you have set "option base 1"
a = Me.combox.Column(0) 'ID
b = Me.combox.Column(1) 'DESC
 
Upvote 0

Forum statistics

Threads
1,221,832
Messages
6,162,255
Members
451,757
Latest member
iours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top