G
Guest
I have built query of a query of a query of a table. Each level also has one
field linked to a table. (see SQL below) I use an input form (frmtest) with
check boxes as query input.
If the boxes on the form are unchecked, it does not return any results the
FIRST time I run the query after opening the frmtest. HOWEVER if I check all
the boxes and then execute it, it returns accurate results. THEN if I
uncheck all the boxes and execute it, it returns accurate results until I
close the frmtest.
What is the deal here? Thanks for your help.
SELECT qryMCAFOandAAFAR.OfficialAANumber, qryMCAFOandAAFAR.OfficialFONumber,
qryMCAFOandAAFAR.FODescription, qryMCAFOandAAFAR.RiskRating,
qryMCAFOandAAFAR.FOStatus, qryMCAFOandAAFAR.OfficialMCANumber,
qryMCAFOandAAFAR.RespDir, qryMCAFOandAAFAR.RespDept,
qryMCAFOandAAFAR.RespDiv, qryMCAFOandAAFAR.RespGroup,
qryMCAFOandAAFAR.RespPerson, qryMCAFOandAAFAR.[Recommended MCA],
qryMCAFOandAAFAR.Determination, qryMCAFOandAAFAR.DueDate,
qryMCAFOandAAFAR.MCAStatus, qryMCAFOandAAFAR.MCAFAR, qryMCAFOandAAFAR.CAPR,
qryMCAFOandAAFAR.CAPRDate, qryMCAFOandAAFAR.AATitle,
qryMCAFOandAAFAR.AADescription, qryMCAFOandAAFAR.AANoticeDate,
qryMCAFOandAAFAR.AAOrg, qryMCAFOandAAFAR.AAAuditorAssessor,
qryMCAFOandAAFAR.AAStatus, qryMCAFOandAAFAR.FOFAR, qryMCAFOandAAFAR.AAFAR,
tblAAOrganizations.[ITS Tracked]
FROM tblAAOrganizations INNER JOIN qryMCAFOandAAFAR ON
tblAAOrganizations.AAOrg = qryMCAFOandAAFAR.AAOrg
WHERE (((tblAAOrganizations.[ITS
Tracked])=[Forms]![frmTest]![cbxITsTracked])) OR
((([Forms]![frmTest]![cbxITsTracked])=0));
field linked to a table. (see SQL below) I use an input form (frmtest) with
check boxes as query input.
If the boxes on the form are unchecked, it does not return any results the
FIRST time I run the query after opening the frmtest. HOWEVER if I check all
the boxes and then execute it, it returns accurate results. THEN if I
uncheck all the boxes and execute it, it returns accurate results until I
close the frmtest.
What is the deal here? Thanks for your help.
SELECT qryMCAFOandAAFAR.OfficialAANumber, qryMCAFOandAAFAR.OfficialFONumber,
qryMCAFOandAAFAR.FODescription, qryMCAFOandAAFAR.RiskRating,
qryMCAFOandAAFAR.FOStatus, qryMCAFOandAAFAR.OfficialMCANumber,
qryMCAFOandAAFAR.RespDir, qryMCAFOandAAFAR.RespDept,
qryMCAFOandAAFAR.RespDiv, qryMCAFOandAAFAR.RespGroup,
qryMCAFOandAAFAR.RespPerson, qryMCAFOandAAFAR.[Recommended MCA],
qryMCAFOandAAFAR.Determination, qryMCAFOandAAFAR.DueDate,
qryMCAFOandAAFAR.MCAStatus, qryMCAFOandAAFAR.MCAFAR, qryMCAFOandAAFAR.CAPR,
qryMCAFOandAAFAR.CAPRDate, qryMCAFOandAAFAR.AATitle,
qryMCAFOandAAFAR.AADescription, qryMCAFOandAAFAR.AANoticeDate,
qryMCAFOandAAFAR.AAOrg, qryMCAFOandAAFAR.AAAuditorAssessor,
qryMCAFOandAAFAR.AAStatus, qryMCAFOandAAFAR.FOFAR, qryMCAFOandAAFAR.AAFAR,
tblAAOrganizations.[ITS Tracked]
FROM tblAAOrganizations INNER JOIN qryMCAFOandAAFAR ON
tblAAOrganizations.AAOrg = qryMCAFOandAAFAR.AAOrg
WHERE (((tblAAOrganizations.[ITS
Tracked])=[Forms]![frmTest]![cbxITsTracked])) OR
((([Forms]![frmTest]![cbxITsTracked])=0));