.hslstprint.additem(.hstxtcode.value,1,1) .hslstprint.AddListItem(.hstxtdesc.value,1,2) .hslstprint.AddListItem(transform(.hstxtamount.value),1,3)
where first number is the listindex (if you have 10 rows in combo, that number goes from 1 to 10) and second number is the "column" index (first, second and third). Note the use of AddItem to add a new row in combo, and use of AddListItem() to add the subsequent values of the same row of the combo. ----- Original Message ----- From: "James E Harvey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2007 6:50 PM Subject: Add items to listbox problem > I'm trying to allow users to add date to a listbox on the fly. The data > is > coming from textboxes on the form where the user enters data, and then > clicks an "Add" button. > > This code is in the method for the click. > > with thisform.hscntcode > .hslstprint.additem(.hstxtcode.value) > .hslstprint.list[1,2] = .hstxtdesc.value > .hslstprint.list[1,3] = transform(.hstxtamount.value) > Endwith > > > It works for the first item, but not subsequent items as the > ".hslstprint.list[1,2]" is problematic. > > Can't figure how to increment the "1" after .list which is what positions > the value in the listbox. > > > James E Harvey > Hanover Shoe Farms, Inc. > M.I.S./Corresponding Officer > Off: 717-637-8931 > fax: 717-637-6766 > email: [EMAIL PROTECTED] > > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

