OK, here it is:
Many thanks
CW
SELECT Inquiries.Ref, Inquiries.Customer1Surname AS Client,
Inquiries.InquiryDate, Inquiries.SurveyDate AS [Survey Date],
Inquiries.OriginAddr03 AS [Orig Town], Inquiries.OriginCountry AS [Orig
Ctry], Inquiries.DestAddr03 AS [Dest Town], Inquiries.DestCountry AS [Dest
Ctry], Inquiries.Status, Inquiries.LostReason, Events.BookedDate AS [Booked
Date], Inquiries.CommissionPaid AS [Comm Paid?], Inquiries.InqStatus,
qryInvoicesForJob.InvNo, qryInvoicesForJob.Paid
FROM (Inquiries LEFT JOIN Events ON Inquiries.Ref = Events.Ref) LEFT JOIN
qryInvoicesForJob ON Inquiries.Ref = qryInvoicesForJob.Ref
WHERE (((Inquiries.Surveyor)="Herdeep Chaggar") AND
((qryInvoicesForJob.InvType)<>"Credit Note") AND
((qryInvoicesForJob.InvStatus)<>"Cancelled"))
ORDER BY Inquiries.InquiryDate DESC;
Bob Quintal said:
I have tried altering the join type but unfortunately this made no
difference - other suggestions, please?
Many thanks
CW
You'll have to post the SQL of the query.
:
I have a query that pulls quite a lot of data for each of our
shipment records, including the invoice number. However, I'm
finding that where a shipment hasn't been invoiced, that whole
record is being omitted from the results.
In those cases I do want the records to be shown, but there
should be a blank for the invoice number.
I guess this may involve the use of Nz and have tried several
ways but I'm not sure of the correct syntax or even if that is
the right solution... Many thanks
CW
I will assume that the query joins the shipments table to the
invoices table. You will need to change the join type _/1 from an
inner join to a left join, and make sure that there are no
critera _/2 other than the join against fields in the invoices
table.
_/1: double click on the join line in the query builder and
select the applicable option (include all records from shipments
and only....)
_/2 any mandatory criteria in the invoices table can be prefixed
with IS NULLL OR in the criteria field.