manually adding a row to a ListBox

  • Thread starter Thread starter Lexta
  • Start date Start date
L

Lexta

I am having trouble trying to manually add a row to a list
box. In all the help doco I can find it says to use
the .AddItem method. Well there is a major problem here.
I don't have a .Additem method for my listbox... I try to
enter it anyway but I get a syntax error, method not
known. Can someone help with this simple but frustrating
problem... it is driving me mad!!!
 
Lexta,

Unfortunately, the AddItem method shown in the help file was left over from
VB. The Access ListBox does not have an AddItem method.

There are three ways to add data to a ListBox:
1. If the ListBox's RowSourceType property = "Table/Query", add the data
to the table whose name is specified in the ListBox's RowSource property.
2. If the ListBox's RowSourceType property = "Value List", manually add
the data to the ListBox's RowSource property, with each item separated by a
semi-colon ( ; ).
3. By implementing a user-defined function. Search Help for
"user-defined function".

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Thank you for your advice. Seems strange that this
functionality was removed but hey I don't write it I just
try to use it. At least now I know I'm not going mad..
thanks again
 
Back
Top