Runtime Error 6148 Invalid Row Number
when run a database application whick uses datagrid control(vb6.0,service pack5),following code cann't run correctly,tell a error:6148 invalid row number.
the code:
[vbcode]
for i=0 to datagrid.approxcount-1
datagrid1.row=i
.......
next i
[\vbcode]
but if datagrid.approxcount<datagrid.visiblerows
that mean not scrolling the datagrid,the code run
correctly.why?and how to solve this problem?
Re: Runtime Error 6148 Invalid Row Number
approxcount might not give the exact number of rows. That is where you are getting your error
Iouri Boutchkine
iouri@hotsheet.com
Re: Runtime Error 6148 Invalid Row Number
[QUOTE=Iouri;73555]approxcount might not give the exact number of rows. That is where you are getting your error
Approxcount is giving the exact number but rowbookmark property is stopping after certain number.
I am facing the exact problem but not able to figure out solution
Re: Runtime Error 6148 Invalid Row Number
Not a VB expert, but doesn't VB6 for loop indexing start at 1? If so, shouldn't the code be:
Code:
for i=1 to datagrid.approxcount
datagrid1.row=i
.......
next i
Re: Runtime Error 6148 Invalid Row Number
[QUOTE=Ap Singh;2229059]
Quote:
Originally Posted by
Iouri
approxcount might not give the exact number of rows. That is where you are getting your error
Approxcount is giving the exact number but rowbookmark property is stopping after certain number.
I am facing the exact problem but not able to figure out solution
Are you sure the OP still needs some help waiting 17 years for your reply? :confused: