E
Ernst Guckel
Hello,
I have two questions... the first is that I am having a bit of trouble
writting the append query. It works great as a select query but when I
change it to an append query I get errors...
There is a ContactID field as autonumber in tblContacts but that should work
fine... ContactCOmpany is a number but it looks up the data fine in the
select query...
2. How do I prevent duplicated over three criteria fields in the query as
well...
Thanks,
Ernst.
Here is the SQL:
INSERT INTO tblContacts ( ContactCompany, ContactLastName, ContactFirstName,
[ContactE-mail], ContactJobTitle, ContactBusinessPhone, ContactMobilePhone,
ContactFaxNumber, Notes )
SELECT DLookUp("CompanyID","tblCompanies","[CompanyBusinessName] = " &
Chr(34) & [Company] & Chr(34)) AS Expr1, CardScanData.LastName,
CardScanData.FirstName, CardScanData.Email, CardScanData.Title,
CardScanData.MainPhone, CardScanData.PhoneMobile, CardScanData.Fax,
CardScanData.Notes
FROM CardScanData;
I have two questions... the first is that I am having a bit of trouble
writting the append query. It works great as a select query but when I
change it to an append query I get errors...
There is a ContactID field as autonumber in tblContacts but that should work
fine... ContactCOmpany is a number but it looks up the data fine in the
select query...
2. How do I prevent duplicated over three criteria fields in the query as
well...
Thanks,
Ernst.
Here is the SQL:
INSERT INTO tblContacts ( ContactCompany, ContactLastName, ContactFirstName,
[ContactE-mail], ContactJobTitle, ContactBusinessPhone, ContactMobilePhone,
ContactFaxNumber, Notes )
SELECT DLookUp("CompanyID","tblCompanies","[CompanyBusinessName] = " &
Chr(34) & [Company] & Chr(34)) AS Expr1, CardScanData.LastName,
CardScanData.FirstName, CardScanData.Email, CardScanData.Title,
CardScanData.MainPhone, CardScanData.PhoneMobile, CardScanData.Fax,
CardScanData.Notes
FROM CardScanData;