D
Duck
I have a series of reports that need to print at the same time, each
of which has a field that displays the date for which the report is
intended. All the reports need to have the same date, but that date
needs to be able to be chosen by the user. The problem is that I
can't use the OpenArgs capability because this particular system is
running MS Office 2000. On my systems with Access 2003 I used the
following code:
Public Sub OpenMealLists()
Dim intAns As Integer
Dim strAnsDate As String
Dim dteDate As Date
intAns = MsgBox("Is This Dining List For Today ?", 36, "Date of
Report")
If intAns = 7 Then
strAnsDate = InputBox("Please Enter Date For This Dining
List")
dteDate = CDate(strAnsDate)
Else
strAnsDate = Date
End If
Debug.Print dteDate
DoCmd.OpenReport "rptMealListB", , , , , strAnsDate
DoCmd.OpenReport "rptMealListL", , , , , strAnsDate
DoCmd.OpenReport "rptMealListD", , , , , strAnsDate
End Sub
How can I ascertain the date to pass once, and pass it to all three
reports without having to query the user three times for the date?
of which has a field that displays the date for which the report is
intended. All the reports need to have the same date, but that date
needs to be able to be chosen by the user. The problem is that I
can't use the OpenArgs capability because this particular system is
running MS Office 2000. On my systems with Access 2003 I used the
following code:
Public Sub OpenMealLists()
Dim intAns As Integer
Dim strAnsDate As String
Dim dteDate As Date
intAns = MsgBox("Is This Dining List For Today ?", 36, "Date of
Report")
If intAns = 7 Then
strAnsDate = InputBox("Please Enter Date For This Dining
List")
dteDate = CDate(strAnsDate)
Else
strAnsDate = Date
End If
Debug.Print dteDate
DoCmd.OpenReport "rptMealListB", , , , , strAnsDate
DoCmd.OpenReport "rptMealListL", , , , , strAnsDate
DoCmd.OpenReport "rptMealListD", , , , , strAnsDate
End Sub
How can I ascertain the date to pass once, and pass it to all three
reports without having to query the user three times for the date?