I must be getting soft....

How the heck to do I programmatically add new rows to a datagrid / flexgrid or whatever grid using VBA?

It's not bound to anything and I'm trying to add data on the fly. Any ideas?

9 Years
Discussion Span
Last Post by agrothe

can use flexgrid.rows=flexgrid.rows+1

let me know wht the exact problem do u have

Sorry, forgot to say that this is an Office VBA application, not straight VB. It's a cinche in VB 6, but in Access 2003, the datagrid or flexgrid controls seam to only allow additions and deletions when bound to a table.

I'm trying to add rows without binding the control. I'll try your code anyway in hopes it will work when I get back to my production computer...


anto_nee, thats exactly right. Problem with Access is it doesn't give you all the properties in the properties drop down, and of course after a while we get lazy and forget all the properties available to us. :)


Have you tried ".AddItem" with column values separated by "vbTab"?


I dunno, that was 2 years ago :P !!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.