At first glance, your query would need to retrieve records where the Arrival Date is >= Date-30 and the Count of Arrival Date >= to 14, plus a calculated field that determines the difference between 14 and the count of arrival date. The amount of information you've provided doesn't allow me to expand upon this much more than that. For instance, is your field for counting the days in the table, and are you manually entering this number? The values for aggregate functions (sum, count, percent, etc.) should not be stored in tables - only handled by forms/reports/queries. Also, I advise you to refrain from using spaces (or special characters) in your field names and maybe Google 'ms access naming convention' and adopt a method that suits you. If you create a spreadsheet with your table/field names, enter dummy data and copy/paste into a posting here, it's easy to create a table in your post. This will help us understand your underlying data setup so we can further advise on a query for you.
One thing you seem to have not considered is whether or not to be concerned with multiple arrival/departures for one camper within the 30 day period. Also, at this point I did not determine what to do if there is an arrival date within 30 days, but no departure date. You might want to default to the current date in that case.
Last edited by Micron; 03-07-2016 at 12:26 PM.
Reason: changed 30 to 14 for difference; our to your
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.