I
injanib via AccessMonster.com
Hello,
This has been working fine untill today. It is a form with a button
"TodaysReport" and an unbound text box called "txtDate".
the default value of the unbound text field is set to =Date().
The button is supposed to filter a report called "Report" for the date value
in the text box. Which will be all the records entered today. The report
contains a field called "ReceivedOn". This field is updated with line
[ReceivedOn]=Date in the after update event of another bound control.
The code behind the button is simply as such.
Private Sub TodaysReport_Click()
Dim strWhere As String
strWhere = "DateValue(ReceivedOn)=#" & Me.txtDate & "#"
DoCmd.OpenReport "Report", acNormal, , strWhere
End Sub
As I mentionded, this has been working just fine untill today. I get the Run-
Time error 3646 " Data type mismatch in criteria expression" and it occurs at
the line DoCmd. OpenReport
Any ideas??
This has been working fine untill today. It is a form with a button
"TodaysReport" and an unbound text box called "txtDate".
the default value of the unbound text field is set to =Date().
The button is supposed to filter a report called "Report" for the date value
in the text box. Which will be all the records entered today. The report
contains a field called "ReceivedOn". This field is updated with line
[ReceivedOn]=Date in the after update event of another bound control.
The code behind the button is simply as such.
Private Sub TodaysReport_Click()
Dim strWhere As String
strWhere = "DateValue(ReceivedOn)=#" & Me.txtDate & "#"
DoCmd.OpenReport "Report", acNormal, , strWhere
End Sub
As I mentionded, this has been working just fine untill today. I get the Run-
Time error 3646 " Data type mismatch in criteria expression" and it occurs at
the line DoCmd. OpenReport
Any ideas??