G
gary-bennett
Hi all,
I've got a query (StringQuery) that returns several string fields from
a table, one of which is a string representing time (in hh:ss
format). I have another query that uses this query as its source and
which I want to filter the results based upon my time field (ie. all
records where time < x).
Here is my 2nd query:
SELECT *
FROM StringQuery
WHERE TimeValue(StringQuery.[7]) < #4:00#
When I run this new query, I see the results (and they look correct--
only the desired times are returned), but then I get the message:
"Data type mismatch in criteria expression".
I've tried creating a new query (StringQuery2) with an additional
field:
SELECT StringQuery.*, TimeValue([StringQuery].[7]) AS [Time]
FROM StringQuery;
This query populates the Time field correctly. When I execute this
query:
SELECT *
FROM StringQuery2
WHERE StringQuery2.Time < #4:00#
I get the same results: the query initially returns the correct
result set but then gives me the same data type mismatch error.
Any help you can offer would be GREATLY appreciated!
Thanks!
Gary
I've got a query (StringQuery) that returns several string fields from
a table, one of which is a string representing time (in hh:ss
format). I have another query that uses this query as its source and
which I want to filter the results based upon my time field (ie. all
records where time < x).
Here is my 2nd query:
SELECT *
FROM StringQuery
WHERE TimeValue(StringQuery.[7]) < #4:00#
When I run this new query, I see the results (and they look correct--
only the desired times are returned), but then I get the message:
"Data type mismatch in criteria expression".
I've tried creating a new query (StringQuery2) with an additional
field:
SELECT StringQuery.*, TimeValue([StringQuery].[7]) AS [Time]
FROM StringQuery;
This query populates the Time field correctly. When I execute this
query:
SELECT *
FROM StringQuery2
WHERE StringQuery2.Time < #4:00#
I get the same results: the query initially returns the correct
result set but then gives me the same data type mismatch error.
Any help you can offer would be GREATLY appreciated!
Thanks!
Gary