Hello,

I must admit I am new to this forum so please be gentle with me.

I am trying to create a work-around for a problem. I am creating an Access database that will insert some data into a SQL Server db. Essentially, what needs to happen is I need to insert non-matching data from an Access Table to a SQL Server table. The easy way would create a linked table to my SQL Server table along with some queries/vba to verify/insert the data. However, this is blocked by my users' firewall.

My users' firewall does not block vba opening a connection with SQL Server so I propose that my workaround to this problem will be to verify the data by opening a recordset.

Assuming:
SQL Database = SQLdb, SQL Table = ManualHistory
Access Database = db1, Access Table = History

A simplified syntax for the SQL statement I need to execute would be something like:

Insert Into SQLdb.dbo.ManualHistory
Select t1.DateTime, t1.TagName
From db1.dbo.History t1
Left Join SQLdb.dbo.ManualHistory t3
On t1.DateTime = t3.Datetime
And t1.TagName = t3.TagName
Where t3.DateTime Is Null



I am a little perplexed how I could do this with two separate recordsets. Any ideas?
Thanks in advance!
Matt