D
dee
Hi,
My query is working fine unless there is a blank or n/a in my
tbl_participants. When that happens, I get an Invalid use of Null error.
If I remove my <60, it displays the integer value of my BoxNo, but when I
add it, I get the error. Here is my code:
SELECT DISTINCT tbl_participants.ppt_first_name,
tbl_participants.ppt_last_name, tbl_participants.box_no,
tbl_participants.ppt_no, tbl_participants.study_no, tbl_dwelling.house_no,
tbl_communities.community_code, tbl_communities.community_name, "X0A 1H0" AS
postal_code, CInt([box_no]) AS Box
FROM tbl_communities, tbl_dwelling INNER JOIN tbl_participants ON
tbl_dwelling.dwelling_id = tbl_participants.dwelling_id
WHERE (((tbl_participants.box_no)<>"isempty" And
(tbl_participants.box_no)<>"n/a") AND ((tbl_participants.study_no) Not Like
"ULC*") AND ((tbl_communities.community_code)="15") AND
((CInt([box_no]))<60));
My query is working fine unless there is a blank or n/a in my
tbl_participants. When that happens, I get an Invalid use of Null error.
If I remove my <60, it displays the integer value of my BoxNo, but when I
add it, I get the error. Here is my code:
SELECT DISTINCT tbl_participants.ppt_first_name,
tbl_participants.ppt_last_name, tbl_participants.box_no,
tbl_participants.ppt_no, tbl_participants.study_no, tbl_dwelling.house_no,
tbl_communities.community_code, tbl_communities.community_name, "X0A 1H0" AS
postal_code, CInt([box_no]) AS Box
FROM tbl_communities, tbl_dwelling INNER JOIN tbl_participants ON
tbl_dwelling.dwelling_id = tbl_participants.dwelling_id
WHERE (((tbl_participants.box_no)<>"isempty" And
(tbl_participants.box_no)<>"n/a") AND ((tbl_participants.study_no) Not Like
"ULC*") AND ((tbl_communities.community_code)="15") AND
((CInt([box_no]))<60));