Oliver2003
Technical User
Hi, I am trying to Open a report between two dates based on two dates teh user enters into two text boxes on a form with a command button. The code I have is below:
Private Sub Command0_Click()
Dim StartDate As Date
Dim FinishDate As Date
StartDate = Me!StartDate
FinishDate = Me!FinishDate
DoCmd.OpenReport "All DTF's Report", acViewPreview, , "[Date of issue] BETWEEN StartDate AND FinishDate"
End Sub
This sort of works but you have to enter the dates in pop up Enter Parameter Value Boxes of StartDate and FinishDate. I would like these to be obtained from the 2 text boxes on the form.
Any ideas?
Private Sub Command0_Click()
Dim StartDate As Date
Dim FinishDate As Date
StartDate = Me!StartDate
FinishDate = Me!FinishDate
DoCmd.OpenReport "All DTF's Report", acViewPreview, , "[Date of issue] BETWEEN StartDate AND FinishDate"
End Sub
This sort of works but you have to enter the dates in pop up Enter Parameter Value Boxes of StartDate and FinishDate. I would like these to be obtained from the 2 text boxes on the form.
Any ideas?