The below code throws the error: "Data type mismatch in criteria expression"
Searching online didn't seem to offer me a solution.
Now, if I use the commented expression instead of the Date counterpart, it doesn't throw the error. For some reason, the Date expression is not well liked.
[EDD] is defined as a Date/Time in the corresponding Table. If I define it in the function as "myDate as String", the error remains. So, assuming that myDate is actually being read as a date due to the definition, how do I check [EDD]? Is there a handy way to debug data types?
Thank you in advance.
Searching online didn't seem to offer me a solution.
Code:
Public Sub update_by_EDD(myDate As Date, myMR As String) Dim rs As Object Set rs = Me.Recordset.Clone ' strCriteria = "([myString] = '" & myMR & "')" strCriteria = "([EDD] = '" & myDate & "')" rs.FindFirst (strCriteria) End Sub
[EDD] is defined as a Date/Time in the corresponding Table. If I define it in the function as "myDate as String", the error remains. So, assuming that myDate is actually being read as a date due to the definition, how do I check [EDD]? Is there a handy way to debug data types?
Thank you in advance.
Comment