Listbox Headers

  • Thread starter Thread starter gjameson via AccessMonster.com
  • Start date 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
 
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
 
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]
 
Back
Top