Sub-Reports Repeating Data

N

NigelP

The below works great but i want this to be user friendly
Is there a way to make "Form1" appear and request the data
when the user opens the report. Because currently I need
to have this form open before i open the report

Have the queries read the date from a text box on the
form, so you only have
to type it once.

Create a small, unbound form named "Form1".
Place a text box on the form, and give it these properties:
Name txtDate
Format Short Date

Now open your query in design view, and replace the
parameter with:
[Forms]![Form1]![txtDate]
Repeat for the other queries.

It is also a good idea to declare this parameter in the
queries, so Access
knows the intended data type. In query design view, choose
Parameters from
the Query menu, and paste in the name
[Forms]![Form1]![txtDate]
Alongside that, tell Access it is a Date/Time type.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Top