Create a separate report for "All months":
- Duplicate the existing report.
- In the new report, remove the prompt and filter.
Я сделал базу данных Access, которая включает даты. У меня есть отчет, связанный с запросом, который при открытии запрашивает у пользователя номер месяца (1-12), чтобы создать отчет за эти месяцы. Например, если я наберу 4, я получу отчет за апрель. Проблема в том, что иногда мне нужен полный отчет за все месяцы, и я считаю, что мне нужно набрать в этом поле шаблон, чтобы получить его. Я пробовал *,?, #,%, "1-12" и "1,2,3 ..., 12", но ничего не получилось, я просто получил пустой отчет.
Вот изображение подсказки:
Create a separate report for "All months":
Since the prompt is coming of the criteria for the query itself, then you need to modify the query, not the report.
Using Is Null
and Is Not Null
in a new expression you can tell Access to either use the given criteria or return all records.
Field
of a new column (Note: you do not need to include the Expr1:
seen in my example below. Access will add that for you.)Show
box.Is Not Null
.or
field below it type Is Null
.It should look something like this:
Now you can either enter a number or leave it blank. If you leave it blank, it will return all records found by the query.