None of the sample records have that situation.
So which field should take precedence - which code should the Y fall under? If you want it under both, this gets more complicated. Will require a UNION query then use the UNION as source for the CROSSTAB. There is no builder or wizard for UNION, must type or copy/paste in SQLView.
SELECT tracking_number, invoice_number, charge_description_code AS Code FROM shipment_details
UNION SELECT tracking_number, invoice_number, charge_description FROM shipment_details;
Then:
TRANSFORM Nz(Max(IIf([code] In ('AHS','AHW','RES','SAT',"CWT"),"Y","N")),"N") AS Data
SELECT Query1.tracking_number, Query1.invoice_number
FROM Query1
GROUP BY Query1.tracking_number, Query1.invoice_number
PIVOT Query1.code In (SAT,AHW,AHS,RES,CWT);