Creating a Dialog box to enter comments in a report

  • Thread starter Thread starter LiseD
  • Start date Start date
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?
 
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]
 
Back
Top