Append to Table ..... KRISH

K

KRISH

Hi! everyone,
Please help how to append rows to table from vb code. Whenever i start
appending i want to delete old data & stop message box saying say "You are
deleting....". Actually I want to append each day during given from date and
todate as criteria. Please help how can i do this.
Thanks
Krish
 
O

Ofer

Try this

Docmd.SetWarnings False ' Turn off the messages
Docmd.RunSQL "DELETE TableName.* FROM TableName" 'Delete query
Docmd.RunSQL "INSERT INTO TableName1 SELECT TableName.* FROM TableName" '
Append Query
Docmd.SetWarnings True ' Turn on the messages

-
\\// Live Long and Prosper \\//
BS"D
 
Top