Minkey
04-13-2005, 01:39 AM
I have a query lots of fields but need to filter on criteria on 3 of the fields - left, right and centre at least one of which will have a value (or indeed 2 of them or all 3 !). Based on a tblData
Need a little help with the sql - i.e. if either left, right or centre has a value - display results.
Thanks in advance
Mile-O
04-13-2005, 01:41 AM
WHERE ([LEFTFIELD] Is Not Null) OR ([CENTREFIELD] Is Not Null) OR ([RIGHTFIELD] Is Not Null)
Minkey
04-13-2005, 02:35 AM
Tried that ! - sorry should have said I have a between dates criteria as well - sql:
SELECT tblData.ID, tblData.Building, tblData.Floor, tblData.Room, tblData.Date, tblData.Tech, tblData.[Centre]
FROM tblData
WHERE (((tblData.Date) Between [Forms]![frmCalendar]![txtDate1] AND [Forms]![frmCalendar]![txtDate2]) AND ((tblData.[Centre])=Is Not Null) OR (tblData.[Left])=Is Not Null) OR (tblData.[Right])=Is Not Null));
This returns the value's but ignores the between dates :confused: