![]() |
|
|
#1
|
|||
|
|||
|
I want to place code in a click event to delete all records in a table but keep the table for new records. DELETE * FROM Employees WHERE Title = 'Trainee'; seems to have trouble with the asterisk.
|
|
#2
|
|||
|
|||
|
Dim db As dao.Database
Set db = CurrentDb() db.Execute "Delete * From [" & TableName & "]" Set db = Nothing |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Macro to delete all rows from a table on close | Jallen17 | Access | 0 | 08-25-2008 10:17 AM |
| Inserting multiple records into a table | New2Access | Programming | 0 | 02-18-2007 09:46 PM |
| Creating a string from all records in a table | ocordero | Programming | 2 | 08-07-2006 07:21 AM |
| Selecting and modifying records in a table | Ed H | Access | 1 | 03-17-2006 09:04 AM |
| Delete query, deleting customers froma table. | keithsrobinson | Queries | 2 | 02-14-2006 08:33 AM |