S
Scott Harris
I have a form that I have unbound fields to choose a beginning and ending
date to get a report to print After pressing a button. Below is the code I
have written to accomplsh the task. Unfortunately I get a run-time error
'2498': An expression you entered is the wrong data type for one of the
arguments.
____________________________________________________________________
Public Sub MPD_Monthly_Click()
Dim stReportCriter As String
Dim MPDstart As Date
Dim MPDend As Date
Dim getdate As String
MPDstart = [Forms]![MDP Main]![ReportStart]
MPDend = [Forms]![MDP Main]![ReportEnd]
getdate = MPDDate
stReportCriter = getdate & " between " & MPDstart & " And " & MPDend
Me!TempField.Value = stReportCriter
DoCmd.OpenReport [MPD Entry], acViewPreview, , stReportCriter
End Sub
________________________________________________________________
Can someone please give me a hand with what may be causing this? Thank you
in advance.
date to get a report to print After pressing a button. Below is the code I
have written to accomplsh the task. Unfortunately I get a run-time error
'2498': An expression you entered is the wrong data type for one of the
arguments.
____________________________________________________________________
Public Sub MPD_Monthly_Click()
Dim stReportCriter As String
Dim MPDstart As Date
Dim MPDend As Date
Dim getdate As String
MPDstart = [Forms]![MDP Main]![ReportStart]
MPDend = [Forms]![MDP Main]![ReportEnd]
getdate = MPDDate
stReportCriter = getdate & " between " & MPDstart & " And " & MPDend
Me!TempField.Value = stReportCriter
DoCmd.OpenReport [MPD Entry], acViewPreview, , stReportCriter
End Sub
________________________________________________________________
Can someone please give me a hand with what may be causing this? Thank you
in advance.