We help IT Professionals succeed at work.

check  text field converted to date if all records has been converted in microsoft access 2013

hi

i have a query like this
SELECT [%$##@_Alias].DateGood, *
FROM (SELECT [Sheet 1].DateWrong, CDate([datewrong]) AS DateGood
FROM [Sheet 1])  AS [%$##@_Alias]
WHERE ((([%$##@_Alias].DateGood) Is Null));

Open in new window


when i try to run this query i get this error message : data type mismatch in criteria expression. what is wrong with this query?
Comment
Watch Question

Try this query:
Select * From (SELECT [Sheet 1].DateWrong, IIf(IsDate([datewrong]),CDate([DateWrong]),Null) AS DateGood
 FROM [Sheet 1]) AS [%$##@_Alias] Where ([%$##@_Alias].DateGood Is Null);

Open in new window

Author

Commented:
thanks a lot