A family of Microsoft relational database management systems designed for ease of use.
This is perfect.
Thank you very much
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have two tables.
Table 1 (tblPeriod) contains 3 fields - "Period", "PeriodStart", "PeriodEnd".
Though the period is usually a given month (eg. July 2024), the start date may differ than the actual date the month starts and ends. (accounting purposes).
Table 2 (tblSales) contains sales info which includes the sales date.
All sales will into a particular period (month).
So if the sale is dated July 8, 2024, it should be in the period July 2024.
I have built a query to capture this info but it it does not work (I knew it wouldn't)
I tried DLookup("Period","tblPeriod","InvoiceDate between PeriodStart and PeriodEnd).
I know my problem is the criteria.
Help me please.
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
This is perfect.
Thank you very much
Try
DLookup("Period","tblPeriod","PeriodStart<=#" & Format([InvoiceDate], "yyyy-mm-dd") & "# AND PeriodEnd>=#" & Format([InvoiceDate], "yyyy-mm-dd") & "#")