View Full Version : Type mismatch error


eme126
08-01-2006, 05:40 AM
:( It says that to get rid of a "type mismatch" error I should add the DAO.lib. But I already had it and I always got the error.

Set oSQL = "SELECT * FROM TableInfo WHERE Caption Like '" & strTarget & "'* "


The last ampersand is the type mismatch.

elbweb
08-01-2006, 07:05 AM
the star/wildcard should be within the quotes, should it not?

edit: clarification: it should be within the single quotes, i.e. :

strSQL = "SELECT * FROM tblSomething WHERE Field LIKE '" & strTemp & "*';"


i think that would cause a type mismatch..

eme126
08-01-2006, 09:41 AM
Thank you :)

elbweb
08-02-2006, 11:52 AM
your welcome :)