Changing a delete function to an export function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form in Access that currently deletes claims, claim numbers, and
other info from various tables when a button is clicked. Is their an easy
way to change all of these queries to export the data to a seperate table
rather than deleting them? Any help would be appreciated.
 
A little more on this......
I have a function that has SQL delete statements. I was wondering if I can
change them to insert statements. Will Access recognize the insert
statements? If not can someone suggest a better way to do this. There are
three tables that are affected by this particular function. Any help will be
appreciated! Thanks!
 
Yes, Access recognizes Insert queries.

But, I hope you realize that changing the word DELETE to the word INSERT does
not make the query an Insert query.
 
I am aware that it won't make it an insert query. Will I be able to write a
SQL statement as I would in SQL server? Will Access regognize teh SQL
statement or is does the syntax need to be different in access?

Nick
 
It depends. Access SQL is different from T-SQL but it is very similar and in
many cases it is close to identical.

You can use the query grid to build a query and then switch to the SQL view.
This will help you with the syntax. The grid is overly aggressive with the use
of parentheses and sometimes will write a query that is more complex looking
than if you did it yourself.

Here is the syntax from the online help.

Syntax

Multiple-record append query:

INSERT INTO target[(field1[, field2[, ...]])
SELECT [source.]field1[, field2[, ...]
FROM tableexpression

Single-record append query:

INSERT INTO target [(field1[, field2[, ...]])]
VALUES (value1[, value2[, ...])
 
Back
Top