Column Names in Listbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a listbox that displays several columns of information which requires
me to scroll to the left or right to view it. To make it more readable, I've
enabled the column names. Unfortunately, the column names use the field names
and they can look pretty cryptic and confusing (txtCourse, curFees, etc). Is
there anyway I can rename these column names to be more friendly without
having to go and change my source field names? Thanks.
ck
 
Use aliases in the RowSource of your combo,e.g.:

SELECT txtCourse AS Course, curFees AS Fees FROM MyTable;
 
Hi Allen, what if my aliases have 2 words, e.g. Unit Price? I tried with
single quotes but the single quotes would also appear in the listbox. Thanks.
ck
 
Thanks again, Allen, for your swift response. Never thought of using square
brackets and it works!
ck

Allen Browne said:
Try square brackets:
SELECT txtCourse AS [Course Name], ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

CK said:
Hi Allen, what if my aliases have 2 words, e.g. Unit Price? I tried with
single quotes but the single quotes would also appear in the listbox.
Thanks.
ck
 
Back
Top