>>docmd.runsql ("delete * from name of the table you wanna empty")
> So this will just delete the records from the local Access application
> right?
Well, *if* "name of table you wanna empy" is a local table, then yes, it
will just delete local data.
Also, keep in mind that instruction only empties *one* table, not all tables
in the application
If you want to empty more than one table, simply repeat that instruction as
many as necessary.
docmd.runsql ("delete * from table1")
docmd.runsql ("delete * from table2")
If you have enforced relationships between tables, you may have to do the
deletes for that group of tables in a specific order (bottom of heirarchy to
top)
Reverse the order when filling those tables again (top of heirarchy to
bottom).
HTH,
"Prachi via AccessMonster.com" <u36281@uwe> wrote in message
news:7619358a536fb@uwe...
> thanks for replying..
> So this will just delete the records from the local Access application
> right?
> Also once i delete these records I want to import fresh data from the main
> database(basically i want to perform File->Get External Data->Import->Type
> of
> database->Name of connection.Is there a way to do this
>
>
>
> Paolo wrote:
>>Hi Prachi,
>>
>>to delete all records in a table, on click event of your button put this
>>few
>>lines of code
>>docmd.setwarnings false
>>docmd.runsql ("delete * from name of the table you wanna empty")
>>docmd.setwarnings true
>>
>>HTH Paolo
>>
>>> Is it possible to delete all records (tables ) at the click of a button?
>
> --
> Message posted via http://www.accessmonster.com
>