Using the following statement, I received a run-time error 13, type mismatch
on the If "DateofService" = #2/8/2010# Then line .
DateofService is a column defined as a Date/Time data type, whit a Short
Date format.
Do Until rst.EOF
Debug.Print rst("DateofService")
If "DateofService" = #2/8/2010# Then
Debug.Print rst("DateofService")
rst.MoveNext
Else
rst.MoveNext
End If
Loop
Terry
I used "DateofService" = #2/8/2010# and received a run-time error '13' type
mismatch on the If "DateofService" = #2/8/2010# line. The suggested
"DateofService = #2/8/2010#" also raised the same error.
Do Until rst.EOF
Debug.Print rst("DateofService")
If "DateofService" = #2/8/2010# Then
Debug.Print rst("DateofService")
rst.MoveNext
Else
rst.MoveNext
End If
Loop
I haven't read the original part of this thread, but I can see the type
mismatch.
Put rst and brackets around "DateOfService"
If rst( "DateofService") = #2/8/2010#
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.