Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Changing the title of a listbox??

http://www.freevbcode.com/ShowCode.Asp?ID=4048

I downloaded this program and started playing around with it to get familiar with access. Yet for some reason I cannot change the listview title. They remain Contact Id & Product Id.

I thought at first it may be pulling the name from the database file itself, so I renamed the column to something else yet that label remains. I cannot find any property associating this label with either of the two boxes. Can anyone tell me what that is associated with.

I know you can your own labels in the column header but the "contact Id" and product Id" stays there!!!!!??

Thanks
[654 byte] By [Force] at [2007-11-11 10:29:49]
# 1 Re: Changing the title of a listbox??
What ListBox are you referring to? I don't see any ListBoxes on the Visual Basic Forms.
pclement at 2007-11-11 17:22:41 >
# 2 Re: Changing the title of a listbox??
Blah...

I meant the ListView. Sorry about that.
Force at 2007-11-11 17:23:33 >
# 3 Re: Changing the title of a listbox??
Do u mean the listview header ?

in the form_load :

Set clmhead1 = lvwContacts.ColumnHeaders.Add(, , "Contact ID", lvwContacts.Width)
Set clmhead2 = lvwProducts.ColumnHeaders.Add(, , "Product ID", lvwProducts.Width)

Change them .
Amahdy at 2007-11-11 17:24:42 >
# 4 Re: Changing the title of a listbox??
Thanks, that did it.
Force at 2007-11-11 17:25:36 >