I have created a query in Access 2003 as follows:
AccFabDate is a date value and GetFabDate is a function thus:
When I run the query with ((AccFabDate)= ">#01/01/1980# and < #01/01/2011#”) there is no problem but when I use the public function to define the query, Access 2003 either crashes or returns.
Error 3464: mismatch in criteria expression. The criteria expression in a Find method is attempting to compare a field with a value whose data type does not match the field’s data type.
Can anyone help? I need to be able to change the query value dynamically and have code to calculate the string values in the public function
Code:
WHERE (((AccDS1check) Is Not Null) AND ((AccFabDate)=GetFDate()) AND ((AccRelacion)=21))
Code:
Public Function GetFabDate () As String GetFabDate = ">#01/01/1980# and < #01/01/2011#” End Function
Error 3464: mismatch in criteria expression. The criteria expression in a Find method is attempting to compare a field with a value whose data type does not match the field’s data type.
Can anyone help? I need to be able to change the query value dynamically and have code to calculate the string values in the public function
Comment