Append to Table ..... KRISH

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top