delete record from external database

  • Thread starter Thread starter Andrew@Rays
  • Start date Start date
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"?
 
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"));
 
Thanks Stuart,

Can you assist with inserting one record (Tbl_Filed_A = "2") into the
MyFile.mdb?
 
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;
 
Sorry, that should have been:

Insert Into Tbl_A (Tbl_Filed_A) IN "C:\MyFile.mdb" SELECT "2" AS Expr1;
 
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?
 
Back
Top