Hi,

I'm trying to contruct what I consider a rather complex query statement.

Here's what I'm trying to accomplish:

I have 2 tables - tblDetail and tblCustomers

tblDetail has the following fields:

SiteID
LocationID

tblCustomer also includes those same 2 fields.

I want to append some data from tblDetail into tblCustomers if and only if the same data DOES NOT exist in tblCustomers. But the tricky part is, I need to test both fields (SiteID and LocationID) in tblCustomers.

For example,

tblDetail contains the following data:

SiteID | LocationID
-------------------
s20 | 1
s20 | 1
s20 | 2

tblCustomers contains the following data:

SiteID | LocationID
-------------------
s20 | 1

When I run the append query, it should only insert the last record from tblDetail as shown above into tblCustomers because that combination of data does not exist in tblCustomers.. Does that make sense?

Any help would be greatly appreciated..

Dan