G
Gina Whipp
I get Syntax error (missing operator) in query expression 'vpVendorID='.
Please explain, as both are Long Integers, what I am doing wrong.
SELECT IIf([cpContactTypeID]=2, DLookUp("vpCompanyName","tblVendorProfile",
"vpVendorID=" & cpContactID), cpDepartment) AS DisplayName, cpFirstName,
cpLastName, cpOfficeNumber, cpContactTypeID
FROM tblContactProfile
UNION ALL SELECT vpCompanyName, Null, Null, vpMainPhone, "V"
FROM tblVendorProfile
UNION ALL SELECT cpCompanyName,cpFirstName, cpLastName, cpMainPhone, "C"
FROM tblCustomerProfile;
Thanks in advance!
Gina
Please explain, as both are Long Integers, what I am doing wrong.
SELECT IIf([cpContactTypeID]=2, DLookUp("vpCompanyName","tblVendorProfile",
"vpVendorID=" & cpContactID), cpDepartment) AS DisplayName, cpFirstName,
cpLastName, cpOfficeNumber, cpContactTypeID
FROM tblContactProfile
UNION ALL SELECT vpCompanyName, Null, Null, vpMainPhone, "V"
FROM tblVendorProfile
UNION ALL SELECT cpCompanyName,cpFirstName, cpLastName, cpMainPhone, "C"
FROM tblCustomerProfile;
Thanks in advance!
Gina