|
From: susan on 3 Jul 2008 08:01 Hi, i have a connection to an access-database which works fine. Now I want to delete all records of a table by clicking a commandbutton. I know I have to use a loop, but I don't get it working... Private Sub Command1_Clcik() Adodc1.RecordSource = "TREX" ' delete all records of this table ' fieldnames are "ID", "Name" and "Title" End Sub Thanks, susan
From: jake on 13 Jul 2008 00:15 Susan: This will work but I believe there is a way to delete all records with 1 command, I just can't remember it: Do while RS.EOF = False RS.Delete RS.MoveNext Loop Don't worry about the field names, doesn't matter. Jake On Jul 3, 7:01 am, "susan" <v...(a)hotmail.com> wrote: > Hi, > > i have a connection to an access-database which works fine. Now I want to > delete all records of a table by clicking a commandbutton. I know I have to > use a loop, but I don't get it working... > > Private Sub Command1_Clcik() > Adodc1.RecordSource = "TREX" > ' delete all records of this table > ' fieldnames are "ID", "Name" and "Title" > > End Sub > > Thanks, > > susan
|
Pages: 1 Prev: _%xvX We're "Outing" The Snake Oil Gurus _%xvX]y Next: Good free ActiveX (.OCX) website |