I'm building a query on the fly through VBA and if appears that if the values for a field are null, the query won't return the record using criteria Like '*' for the field. Is that a correct? Here is the SQL of the query:
WHERE (((qS.MSDSID) Like '*') AND ((qS.ProductName) Like '*') AND ((qS.Category) Like '*') AND ((qS.MName) Like '*') AND ((qS.ChemTrekNo) Like '*') AND ((qS.PartNO) Like '*'));
In my table there are only 6 records and ChemTrekNo is null for all 6. Using Like '*' as criteria for ChemTrekNo no records are returned. What do I do if I want the records that contain nulls? Wrap it in Nz? What would the SQL look like?
Posted by: email@example.com
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (1)|