delete records marked with checkboxes 
Author Message
 delete records marked with checkboxes

I want to write out selected records from a access table and place
checkboxes alongside them with a delete key at the bottom. I can not figure
out how to link the checkboxes with the records to be deleted.
Any suggestions?
Scott


Mon, 22 Apr 2002 03:00:00 GMT  
 delete records marked with checkboxes
Give each one an index corresponding to the record number in question(or
other reference number)
Then go through all the checkboxes with a FOR-NEXT(or maybe a FOR EACH-NEXT)
and delete as required.

BTBB


Quote:
> I want to write out selected records from a access table and place
> checkboxes alongside them with a delete key at the bottom. I can not
figure
> out how to link the checkboxes with the records to be deleted.
> Any suggestions?
> Scott



Mon, 22 Apr 2002 03:00:00 GMT  
 delete records marked with checkboxes
Thanks for the help, I think I have a sense of what you are saying.
So..

<input type=checkbox name=<%=rs("index")%> >

then
for index is true
delete record
next

Something like this? obviously some steps missing..
Scott


Quote:
> Give each one an index corresponding to the record number in question(or
> other reference number)
> Then go through all the checkboxes with a FOR-NEXT(or maybe a FOR
EACH-NEXT)
> and delete as required.

> BTBB



> > I want to write out selected records from a access table and place
> > checkboxes alongside them with a delete key at the bottom. I can not
> figure
> > out how to link the checkboxes with the records to be deleted.
> > Any suggestions?
> > Scott



Mon, 22 Apr 2002 03:00:00 GMT  
 delete records marked with checkboxes
Yes. In theory this should work. Emphasise theory. I suggest having the
checkboxes in a series of<object> tags with the index property increasing as

For a = 0 to numcheckboxes-1
If checkbox(a) then record(a).delete
next a

or something along those lines. Having the checkboxes named
check1,check2,check3... is a very bad idea. It requires much more code and
expansion(as well as deletion) becomes impossible. Therefore use the index
property IF it exists using <input> tags. Otherwise use <object> tags.

BTBB


Quote:
> Thanks for the help, I think I have a sense of what you are saying.
> So..

> <input type=checkbox name=<%=rs("index")%> >

> then
> for index is true
> delete record
> next

> Something like this? obviously some steps missing..
> Scott



> > Give each one an index corresponding to the record number in question(or
> > other reference number)
> > Then go through all the checkboxes with a FOR-NEXT(or maybe a FOR
> EACH-NEXT)
> > and delete as required.

> > BTBB



> > > I want to write out selected records from a access table and place
> > > checkboxes alongside them with a delete key at the bottom. I can not
> > figure
> > > out how to link the checkboxes with the records to be deleted.
> > > Any suggestions?
> > > Scott



Wed, 24 Apr 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Dbase record marked as deleted

2. Deleted/Marked records in FoxPro

3. dbase delete marked records

4. Check mail subject, mark as read, delete - How?

5. Delete last paragraph mark in a selection

6. Setting Delete Revision Marking

7. Delete Section mark using VBA

8. Delete from beginning of line to paragraph mark

9. dBase file marked as deleted?

10. Deleting records from a recordset without deleting from the database

11. Deleted records when text file is linked as table (#deleted)

12. DELETE statement (deleting but 0 records affected)

 

 
Powered by phpBB® Forum Software