View Full Version : Date Range displayed on a report


DebbieV
06-24-2002, 11:03 AM
I have created a switchboard that has text boxes and group buttons to get to all the forms and reports in this database. The text box I am having a problem with is the txtStartDate and txtEndDate. Actually these boxes work find. What I want to happen is that the dates that are entered in the start and end box, I would like those dates to appear on the report. Like transactions between: txtStartDate and txtEndDate. I have written the following code in the cmdPreview
strWhere = strwhere & " AND DepositDate = " & "#" & txtStartDate & "#"
ElseIf Not Is Null (txtEndDate) then
strWhere = strWhere & " AND Deposit Date Between " & "#" &
txtStart & "#" & " AND & "#" & txtEndDate & "#"
EndIF

I am not sure what to put in the text box on the design part of the report so those dates appear. I have tried writting Begin DepositDate and EndDepositDate but that just prompts you to have to enter those dates twice. Once when you entered it in the text box and a 2nd time when the parementer box prompts you for it. I also tried using txtStartDate and txtEndDate.

Look forward to your response.

Debbie

David R
06-24-2002, 11:07 AM
in this box you can make the Record Source:
= "Transactions Between " & Forms!FormName.txtStartDate & " and " & Forms!FormName.txtEndDate

You can format the text box to look like a Label, even though it technically isn't.

DebbieV
06-25-2002, 06:53 AM
David,

Thank you very very much, your response worked perfect.

Debbie