delete record from external database

A

Andrew@Rays

Hi,

How do I delete a record in an external database?

In the Current DB the SQL is:

"DELETE Tbl_A.Field_1 FROM Tbl_A WHERE ((Tbl_A.Field_1)="1"));

From the Current DB how do I delete the table if it is in a database called
"C:\MyFile.mdb"?
 
S

Stuart McCall

Andrew@Rays said:
Hi,

How do I delete a record in an external database?

In the Current DB the SQL is:

"DELETE Tbl_A.Field_1 FROM Tbl_A WHERE ((Tbl_A.Field_1)="1"));

From the Current DB how do I delete the table if it is in a database
called
"C:\MyFile.mdb"?

DELETE Tbl_A.Field_1 FROM Tbl_A IN "C:\MyFile.mdb" WHERE
((Tbl_A.Field_1)="1"));
 
A

Andrew@Rays

Thanks Stuart,

Can you assist with inserting one record (Tbl_Filed_A = "2") into the
MyFile.mdb?
 
S

Stuart McCall

Andrew@Rays said:
Thanks Stuart,

Can you assist with inserting one record (Tbl_Filed_A = "2") into the
MyFile.mdb?

Insert Into Tbl_A IN "C:\MyFile.mdb" (Tbl_Filed_A) SELECT "2" AS Expr1;
 
S

Stuart McCall

Sorry, that should have been:

Insert Into Tbl_A (Tbl_Filed_A) IN "C:\MyFile.mdb" SELECT "2" AS Expr1;
 
A

Andrew@Rays

Hi Stuart,

Can you assist with this one?

I want to run the following code in a closed DB from an open 1. I want it
to

sSQL = "SELECT Qry_Merge_Tbl_Weekly_SOHO_Min_Max_With_New_Data.* "
sSQL = sSQL & "INTO Tbl_Weekly_SOHO_Min_Max "
sSQL = sSQL & "FROM Qry_Merge_Tbl_Weekly_SOHO_Min_Max_With_New_Data;"
DoCmd.RunSQL sSQL

Any ideas?
 

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