Creating a Dialog box to enter comments in a report

L

LiseD

I am trying to create some sort of dialog box to pop up when generating a
report to enter general comments. The report is generated from a query that
has a parameter field for a date between two dates. I would also like to
have this information included on the report (which dates the report runs
from and to), AND would like to be able to enter general comments to be added
to the report when generating. Is this possible and how does one do this?
 
D

Duane Hookom

IMO, parameter prompts are never good user interface. Consider creating a
form with the date and comments text boxes. You can then reference these
controls in your report's record source query.

SELECT Forms!frmDatesComment!txtComments as Comments, *
FROM {my record source query}
WHERE [DateField] Between Forms!frmDatesComment!txtStartDate And
Forms!frmDatesComment!txtEndDate;

If you really want to use parameter prompts, you can create one for the
comments like:
SELECT [Enter Brief Comments] as Comments, *
FROM {my record source query}
WHERE [DateField] Between [Start Date] And [End Date];

You can bind a control on your report to:
=[Enter Brief Comments]
and
="Report Start Date: " & [Start Date]
="Report End Date: " & [End Date]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top