943,866 Members | Top Members by Rank

Ad:
May 4th, 2009
0

Clear a table on button click.

Expand Post »
Hello friends, I want to clear a table by clicking a button on a form. I have created the query to clear the table but I cannot make it the source for the command button on the form. Is this possible? Thanks for your time and help.
Similar Threads
Reputation Points: 100
Solved Threads: 48
Posting Pro in Training
Grn Xtrm is offline Offline
495 posts
since Nov 2008
May 4th, 2009
1

Re: Clear a table on button click.

I'm sure there is a VBA approach to this, but you could also make a macro with 6 lines in it.

Make a new Macro and use the following:

SetWarnings = No
OpenTable = table you want to remove all records from
RunCommand = SelectAllRecords
RunCommand = DeleteRecord
Close = choose table and specify table you just opened
SetWarnings = Yes


After the macro is made, make a command button and assign the macro to it.

No need to use a query to do this.

Good luck
Last edited by HI2Japan; May 4th, 2009 at 7:20 pm. Reason: added more info.
Reputation Points: 35
Solved Threads: 21
Junior Poster
HI2Japan is offline Offline
195 posts
since Mar 2006
May 5th, 2009
0

Re: Clear a table on button click.

Many thanks, it worked just as I wanted it to!
Reputation Points: 100
Solved Threads: 48
Posting Pro in Training
Grn Xtrm is offline Offline
495 posts
since Nov 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: Employee Call-Out Report
Next Thread in MS Access and FileMaker Pro Forum Timeline: memo field problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC