Listbox Headers

  • Thread starter gjameson via AccessMonster.com
  • Start date
G

gjameson via AccessMonster.com

Hello, would anybody be able to tell me how to set a listbox's headings
in code?

I am using :

Row Source Type - Table/Query

Row Source =
SELECT DISTINCTROW Customer.ID, Customer.[Cust Name], Customer.[St Nbr],
Customer.[St Name], Customer.MODEM_PHNE, Customer.IT_CUST, Customer.EVC_BRAND,
Customer.CHT_BRAND, Customer.[Mtr Size], Customer.[Mtr #], Customer.[Prem #]
FROM Customer WHERE (((Customer.ID) Like [Forms]![Main]![srcID]& "*") AND (
(Customer.[Cust Name]) Like [Forms]![Main]![scrCustomer]& "*"));

Any help would be greatly appreciated.

Gerald
 
G

Graham Mandeno

Hi Gerald

You turn column headings on or off using the ColumnHeads property of the
listbox, which can be set to True or False.

Do you mean that you want to alter the heading of a column from the default,
which is the name of the table field?

To do this when your RowSource is a SELECT statement, you must use "AS" to
modify the field name. For example:

SELECT DISTINCTROW Customer.ID AS [Cust No.], ... etc
 
G

gjameson via AccessMonster.com

That works great! Thanks alot Graham.

Gerald

Graham said:
Hi Gerald

You turn column headings on or off using the ColumnHeads property of the
listbox, which can be set to True or False.

Do you mean that you want to alter the heading of a column from the default,
which is the name of the table field?

To do this when your RowSource is a SELECT statement, you must use "AS" to
modify the field name. For example:

SELECT DISTINCTROW Customer.ID AS [Cust No.], ... etc
Hello, would anybody be able to tell me how to set a listbox's headings
in code?
[quoted text clipped - 16 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top