From: Frank Situmorang on 10 Jan 2010 23:13 Hello, Can anyone help me how can we make it just to pressed the button, then all records in a table will be deleted/ purge out. Background: I want to distrtibute copy of my church database to all pastors of our church. In my membership database, there is a child table of Notes...in which a church clerck can put a note for the member. Before I give the copy of the database to pastors, I want to purge out all the content of the table of Notes, so that later I can collect it from them and inport their notes table to be combined with the central database which is the one a scretary has. I have made an append query for that. Thanks for any help. Frank -- Frank Situmorang
From: Arvin Meyer [MVP] on 10 Jan 2010 23:27 In the click event of the button try: CurrentDb.Execute "Delete * From YourTableName;" -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Frank Situmorang" <FrankSitumorang(a)discussions.microsoft.com> wrote in message news:E6D579F3-99C0-4586-B4D7-FAE392883918(a)microsoft.com... > Hello, > > Can anyone help me how can we make it just to pressed the button, then all > records in a table will be deleted/ purge out. > > Background: > > I want to distrtibute copy of my church database to all pastors of our > church. In my membership database, there is a child table of Notes...in > which > a church clerck can put a note for the member. Before I give the copy of > the > database to pastors, I want to purge out all the content of the table of > Notes, so that later I can collect it from them and inport their notes > table > to be combined with the central database which is the one a scretary has. > I > have made an append query for that. > > Thanks for any help. > > Frank > -- > Frank Situmorang
From: Mike Painter on 11 Jan 2010 01:26 I'd suggest adding a msgbox to ask if they really want to do this. I wrote a billing program in MS BASIC many years ago and asked that question. Then she asked that I modify to to ask twice. (At which point she realized I was right about demanding she back things up.) Then she asked that I modify to to ask three times. Arvin Meyer [MVP] wrote: > In the click event of the button try: > > CurrentDb.Execute "Delete * From YourTableName;" > > "Frank Situmorang" <FrankSitumorang(a)discussions.microsoft.com> wrote > in message news:E6D579F3-99C0-4586-B4D7-FAE392883918(a)microsoft.com... >> Hello, >> >> Can anyone help me how can we make it just to pressed the button, >> then all records in a table will be deleted/ purge out. >> >> Background: >> >> I want to distrtibute copy of my church database to all pastors of >> our church. In my membership database, there is a child table of >> Notes...in which >> a church clerck can put a note for the member. Before I give the >> copy of the >> database to pastors, I want to purge out all the content of the >> table of Notes, so that later I can collect it from them and inport >> their notes table >> to be combined with the central database which is the one a scretary >> has. I >> have made an append query for that. >> >> Thanks for any help. >> >> Frank >> -- >> Frank Situmorang
From: John W. Vinson on 11 Jan 2010 11:05 On Sun, 10 Jan 2010 22:26:39 -0800, "Mike Painter" <md.painter(a)sbcglobal.net> wrote: >I'd suggest adding a msgbox to ask if they really want to do this. > >I wrote a billing program in MS BASIC many years ago and asked that >question. >Then she asked that I modify to to ask twice. (At which point she realized >I was right about demanding she back things up.) >Then she asked that I modify to to ask three times. "I have told you once, I have told you twice - What I tell you three times is true!" - _The Hunting of the Snark_ And sometimes that's not enough. Sometimes the user is NOT right. -- John W. Vinson [MVP]
From: Arvin Meyer [MVP] on 11 Jan 2010 14:55
If MsgBox ("Are you really, really, REALLY sure?", vbYesNo) = vbYes Then MsgBox "Say 'Please Delete' 4 times and click your heels twice", vbOKOnly End If -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Mike Painter" <md.painter(a)sbcglobal.net> wrote in message news:xwz2n.3394$ap2.1358(a)newsfe18.iad... > I'd suggest adding a msgbox to ask if they really want to do this. > > I wrote a billing program in MS BASIC many years ago and asked that > question. > Then she asked that I modify to to ask twice. (At which point she > realized I was right about demanding she back things up.) > Then she asked that I modify to to ask three times. > > Arvin Meyer [MVP] wrote: >> In the click event of the button try: >> >> CurrentDb.Execute "Delete * From YourTableName;" >> >> "Frank Situmorang" <FrankSitumorang(a)discussions.microsoft.com> wrote >> in message news:E6D579F3-99C0-4586-B4D7-FAE392883918(a)microsoft.com... >>> Hello, >>> >>> Can anyone help me how can we make it just to pressed the button, >>> then all records in a table will be deleted/ purge out. >>> >>> Background: >>> >>> I want to distrtibute copy of my church database to all pastors of >>> our church. In my membership database, there is a child table of >>> Notes...in which >>> a church clerck can put a note for the member. Before I give the >>> copy of the >>> database to pastors, I want to purge out all the content of the >>> table of Notes, so that later I can collect it from them and inport >>> their notes table >>> to be combined with the central database which is the one a scretary >>> has. I >>> have made an append query for that. >>> >>> Thanks for any help. >>> >>> Frank >>> -- >>> Frank Situmorang > > |