View Full Version : Calendar dates in report


Minkey
07-07-2004, 03:12 AM
I'm sure one of you guys or gals can help.
I'm trying to display the selected dates from a calendar form in a report (text box) using the following control source:

From date : [Forms]![frmCalendar]![txtClick1]
To date: [Forms]![frmCalendar]![txtClick2]

The report seems to work fine except the text box which displays #Name?
Im sure Im missing something obvious any ideas.

KenHigg
07-07-2004, 03:21 AM
Is frmCalendar open when the report prints?

Minkey
07-07-2004, 03:26 AM
Yep the form stays open until the user closes it

KenHigg
07-07-2004, 03:28 AM
And txtClick1 is the name of one of the date fields?

Minkey
07-07-2004, 03:33 AM
Yep - txtClick1 is the from date which is populated from the date select from the calender.
It works fine when used in a query i.e. Between [Forms]![frmCalendar]![txtClick1] And [Forms]![frmCalendar]![txtClick2]
Could the fact that the report is being generated from this query be an issue ??

KenHigg
07-07-2004, 03:40 AM
Hum... No, I use this on my reports on a regular basis with no problems. I would do a plain generic text box with some test text in it and see if the report will display it...

AN60
07-12-2004, 03:53 PM
Try this, it is what I use on reports when I use a form + calendar to select dates;

="Dates From" & " " & [Forms]![Name of your Form]![txtFrom] & " " & "To" & " " & [Forms]![Name Of your Form]![txtTo]

You will have to edit "name of your form" and "txtFrom" and "txtTo" to reflect your particular field or form names.

Minkey
07-14-2004, 08:12 AM
I'll try that out - though I don't have access to the db moment - thanks