Combo box col 3

jake7363

Registered User.
Local time
, 23:49
Joined
Mar 14, 2005
Messages
46
Hi,
I have a combobox with three columns, and the bound column is column 1. With the following code, I have tried to make column 3 visible in a text box:


Private Sub jobName_AfterUpdate()
txtJobDesc.Value = JobName.Column(1)
End Sub

However, this is not working.

Any help will be greatly appreciated.

Thanks in advance...

jake
 
"Column" starts counting at 0
So if you want the value from the third column,
you need JobName.Column(2)
If you just want to make it visible,
why don't you set the controlsource of txtJobDesc = JobName.Column(2)
 
I tried the column change, but no helpl

To answer your question, I need the first column(0) and third column(2) to be visible. Col 0 is in the combo box and the plan for col 2 was to be in a text box..

Hope that answers the question, or did I misunderstand?
 
have you tried to set the value of controlsource of txtJobDesc to
'= JobName.Column(2)'
This should work without VBA
 
Would it be easier to display both column 1 and 3 together in the combo box?

If so (hope you can follow) click on the query builder beside the combobox record source. Add an extra column to the query. Give it a different name to the names in the table.

txtJobName:[OneOfYourFiledNames] & " - " & [AnotherFieldName]

Note the column that the new field is in (probably the 4th column)

Close and update the query.

Then in the column widths put
0;0;0
This will hide the first 3 columns, displaying the forth, with the combined data.

Dave
 
In terms of a background on what it is doing, I am pushing the 200 character mark.

The first column is a mandatory visible at all times (and long), the job name. The second column is to be visible when selecting the record, because it gives a piece of information on correct data entry for another field. Once the first column is selected, only the first column shows. The third column is also a long one, the column in question, and needs to be visible to describe the first column. Some individuals understand column one, but others don't. For those that don't, column three is necessary. It is not selectable, it is locked (but enabled).

This contraption was not my idea, I'm only following instructions and trying to get it done.
 

Users who are viewing this thread

Back
Top Bottom