I have two Access DBs. One has all of the Customer Information (Sales DB)and resides on a machine without Access. The other contains a table with New Customer Information (NewInfo DB) which is emailed to the receipients frequently, in the same table format.

I would like a routine using SQL, to Update the information in the Sales DB,with information from the NewInfo DB.

I would also like a routine to Add New information into the Sales DB, with New records from the NewInfo DB.

I have the following so far:
VB Code:
  1. Public Sub UpdateCustomerData()
  2.     Dim SQL As String
  3.     Dim CnnSales As ADODB.Connection
  4.     Dim CnnNewInfo As ADODB.Connection
  5.    
  6.     Set CnnSales = New ADODB.Connection
  7.     strConnectSales = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  8.         "Data Source=" & App.Path & "\DB\Sales.mdb;" & _
  9.         "Persist Security Info=True;"
  10.    
  11.     Set CnnNewInfo = New ADODB.Connection
  12.     strConnectNewInfo = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  13.         "Data Source=" & App.Path & "\DB\NewInfo.mdb;" & _
  14.         "Persist Security Info=True;"
  15.  
  16.     CnnSales.Open strConnectSales
  17.     CnnNewInfo.Open strConnectNewInfo
  18.        
  19.     SQL = "Insert into [tblCustomers] (Account,Name,Address) values ('1','2','3')"
  20.     CnnSales.Execute SQL
  21.  
  22. End Sub

I am just stuck on how to write the WHERE portion of the SQL, refering to the second DB and table.

I think I can get the second routine, if I could just get over this hump.

Help?