Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add row in a listbox

Status
Not open for further replies.

supervi

MIS
Mar 22, 2003
61
0
0
CA
Basically i want to add a row in the MIDDLE of a listbox. I know exactly where this row should be.

I have a listbox with many columns and many rows. I have a while loop checking for a particular field in this listbox. When it finds this field i want to the following to happen.

As soon as it gets to this field i want it to add an extra row right under it that says TOTAL. I dont want it to delete any rows below it.

i thought it would be something like this

me.listbox.addrow(counter+1)

me.lisbox.Column(1,counter+1) = "Total"

If their are any questions please ask

Thanks
 
Howe are ya supervi . . . .

Hmmmmmmmmmmmm . . . . . Is the [blue]Row Source[/blue] a Table, Query or Value List?

cal.gif
See Ya! . . . . . .
 
It says that it is a Table/Query. However i use VB code in a button with that says

Me.listbox.RowSource = ProductsSelected

I hope this helps

 
supervi . . . .

If you had mentioned [blue]Value List[/blue] as the type. You would have had 1/2 a chance. As it stands with [blue]Table/Query[/blue] . . . . there's just too much to do to gain the result. Besides the fact that considering other items will be added to the list, will make it that much harder to maintain the middle position.

It would be betterto devise another schema, as this could cause you greater headaches tomorrow.

cal.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top