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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add A New Record To An Unbound DataGrid

Status
Not open for further replies.

HeLeNaMiLaNo

Programmer
Jan 15, 2003
7
AU
Im trying to add a new record to an empty datagrid and i am getting the following error message -

"Rowset not available"

My code is:

grdActions.AllowAddNew = True
grdActions.Row = 0
grdActions.Columns(0).Text = "bla bla"
grdActions.Columns(1).Text = "bla bla"

Any help will be much appreciated - thanks in advance.
 


Sounds like the underlying recordset that is tied to the grid may not allow additions. there are a number of reasons this coud happen

If it is possible the add records then a blank row will open after all your data (even if none) is displayed.
 

The VB6 OLEDB DataGrid cannot be used unbound.

You will need to create an empty recordset (with-out a database) then add the fields to the rs and bind the grid to it.

With a DBGrid you could do this though, even if somewhat complicated.
 

Thanks compdrmt + CCLINT 4 ur help - much appreciated - i will try you suggestion CCLINT and see how i go. Thanks again :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top