C
charles.kendricks
I have a report that prints our meal lists for my organization. I
created the database in access 2003. When the database was moved to a
system running MS Office 2000, suddenly this particular report will
not print out the reports. I get an error which complains about the
number of arguments to OpenReport. Here is the code for the report:
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
created the database in access 2003. When the database was moved to a
system running MS Office 2000, suddenly this particular report will
not print out the reports. I get an error which complains about the
number of arguments to OpenReport. Here is the code for the report:
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