I have a warehousing database that uses the "ShipRefs" (Labeled as shipment on the form) field to associate items to a particular shipment. I am now creating an invoicing form in order to generate a bill for that customer per shipment per month. I can select the shipment based on the customer via a combo box but I cannot filter those shipments based on if they have been billed for the month.
What would be the best way to determine if a shipment has been billed for the current month and only show those that have not been billed in the combo box? (Please be aware the the "Last Billdate" field was a failed attempt at this) Data:
QUERY for the shipment combo box row source:
SELECT DISTINCT ItemList.ShipRef, ItemList.CRef, InvoiceData.[Last Billdate]
FROM ItemList AS ItemList_1, ItemList INNER JOIN InvoiceData ON ItemList.ShipRef = InvoiceData.Shipment
WHERE (((ItemList.CRef)=[Forms]![InvoiceData]![Customer]) AND ((InvoiceData.[Last Billdate])>=Date()-30));