Subject Re: Delete (all) in a form
From Charlie <tm@tc.com>
Date Mon, 13 Aug 2018 10:11:00 -0400
Newsgroups dbase.getting-started

I actually tried it with the remaining two and it deleted successfully one row.  I guess the problem is that it is skipping rows.  I'll try more rows later after work... Thanks!!!!  

Akshat Kapoor Wrote:

> On 13/08/2018 18:09, Charlie wrote:
> > Hi Akshat...
> >
> > I think either the form or the table are haunted!!!
> >
> > I changed to a different form of delete in this:
> >
> > function PUSHBUTTON1_onClick()
> >         p=form.pictemp11.rowset
> >     //form.train1.emptyTable( "pictemp1" )
> >         cnt=p.count()
> >         msgbox ( ""+ cnt )
> >         p.first()
> >         do while cnt > 0
> >            p.delete()
> >                 cnt = cnt-1
> >                 msgbox( ""+CNT )
> >                 p.next()
> I am not sure and do not have all the files to check but when you issue
> p.delete() rowset pointer should automatically move to next row so you
> probably won't be needing p.next() comment it out and try once again.
>
>
> >         enddo
> >
>
> You have tried with just 4 rows and hence found 2 left over had you
> tried it with more rows there would have been more left.
>
> Regards
> Akshat
>