Question : Access multi-column combobox selection

I am using a multi-column combobox on a form. When user selects a row, the first column is displayed in the combobox. How can I change this to display the 2nd column in the combobox once selected ?

I know I can change first & second columns around, but I  wish to keep them as they are.

Answer : Access multi-column combobox selection

It's an old technique.

Suppose your source is currently:
SELECT FieldA, FieldB, FieldC FROM TableName
with a column widths, say:
1; 3; 3

But you want FieldB to be displayed upon selection then you could change the source to
SELECT FieldB, FieldA, FieldB, FieldC FROM TableName
and up your column count to 4 (of course) and set your columns to:
0.002; 1; 3; 3

That way the first column won't be rendered in your dropped down list (it's too narrow).
However, as the first non-zero width column listed, it will be displayed upon selection of the value.

Cheers.

Random Solutions  
  •  When establishing an ADO connection to a database, is it necessary to have a file path that is free of blank spaces?
  •  The transaction log for database 'mydatabase' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
  •  The report server is not responding. Verify that the report server is running and can be accessed from this computer.
  •  sql server  login
  •  Autofill Date Field in Access 2007
  •  Visual Basic Code - Excel - Merge multiple worksheets in an excel workbook into single worksheet
  •  Adding PowerPoint Viewer to winform desktop app.
  •  migrating SQL databases to another server and get some weird error messages
  •  Your database or project contains a missing or broken reference to the file 'DSDBListVw2.dll' version 1.0.
  •  IIS7 won't parse classic ASP / VBScript
  •  
    programming4us programming4us