mateogp
10-15-2004, 05:38 PM
Is there a macro that will delete all the records in a table? Ive tried a few different ones but they're not what im looking for.
Thanks,
Matt
Thanks,
Matt
|
View Full Version : Deleting all records in a table mateogp 10-15-2004, 05:38 PM Is there a macro that will delete all the records in a table? Ive tried a few different ones but they're not what im looking for. Thanks, Matt Uncle Gizmo 10-15-2004, 06:00 PM Make a delete query and call that from the macro... mateogp 10-16-2004, 08:55 AM Wouldnt that not delete the records in the table, just the query itself? Thanks for your help, Matt Uncle Gizmo 10-16-2004, 09:04 AM No, Because most queries (there are exceptions) are not anything other than a set of records from your table(s). Records do not exist in a query, they exist in the tables only. The query is a selection of records from one or more tables. Uncle Gizmo 10-16-2004, 09:13 AM The tables are containers for your data, the queries are views of that data. Also some queries have the ability to operate on that data in some way. A basic query is a "Select Query" and that shows you a selection of records from one or more tables depending on criteria you specify. For example if you had a table of names and addresses, you could use a query to just show addresses in the USA, or just the UK. Other queries are called Action Queries and they can work on the data. One action query type is the delete query. If you made a query that returned all the addresses in the USA and then you selected the option to change that select query into a delete query, when run it would delete all of the addresses in the USA. mateogp 10-16-2004, 09:35 AM Uncle Gizmo, Thanks so much for your help! That was exactly what I was looking for. Thanks again! Mateo |