I have the following query:
SELECT tblTransactions.TransactionID, tblAccount.AccountNumber, tblAccount.AccountName, tblTransactions.TransactionDate, tblTransactions.TransactionNumber, tblTransactions.CheckNumber, tblTransactions.InvoiceNumber, tblTransactions.PONumber, tblTransactions.VoucherNumber, tblTransactions.TransactionMemo, IIf(IsNull([VendorName]),[Employee Name] & ", " & [Employee Name],[VendorName]) AS Vendor
FROM ((tblTransactions LEFT JOIN tblAccount ON tblTransactions.AccountID = tblAccount.AccountID) LEFT JOIN tblVendor ON tblTransactions.VendorID = tblVendor.VendorID) LEFT JOIN qryEmployeeExtended ON tblTransactions.EmployeeID = qryEmployeeExtended.EmployeeID;
This piece of it is causeing me a headache:
IIf(IsNull([VendorName]),[Employee Name] & ", " & [Employee Name],[VendorName]) AS Vendor
What I want is it to display the Vendor Name is the Employee name is blank or the Employee name id the Vendor name is blank. Right now if the vendor name is blank it repeats the employee name twice. I know I am close but can someone pushe me over the hump?
Thanks,
Art Lorenzini
Sioux Falls, SD
Rabu, 02 November 2011
[MS_AccessPros] Using ISNULL in a query
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar