I have been working on a query form to return specific values, but there may be something incorrect with the joins.
The form has several combo boxes to pull values and several check boxes for selection.
It seems to work, but if I select:
Combo Box1: apples
Check Box1: Checked
The result is apples and oranges…there is a record with Oranges and ‘Check Box1’ is checked in the record.
My expected result was no record selected since ‘check box1’ has no value in the apples record.
This is the query I am using:
SELECT DISTINCT RTS.CorrDate, RTS.CorrSource, RTS.CorrType, RTS.SubmissionType, RTS.SerSupNo, RTS.ProdName, RTS.TypeCMC, RTS.TypePharmTox, RTS.TypePK, RTS.TypeLabel, RTS.TypeDDMAC, RTS.TypeRA, RTS.Comments
FROM RTS
WHERE (((RTS.CorrDate) Between [Forms]![Query Form]![StartDate] And [Forms]![Query Form]![EndDate])) OR (((RTS.CorrSource)=[Forms]![Query Form]![Source])) OR (((RTS.CorrType)=[Forms]![Query Form]![Type])) OR (((RTS.SubmissionType)=[Forms]![Query Form]![SubmissionType])) OR (((RTS.ProdName)=[Forms]![Query Form]![Type])) OR (((RTS.TypeCMC)=[Forms]![Query Form]![CMC_CK])) OR (((RTS.TypePharmTox)=[Forms]![Query Form]![PharmTOX_CK])) OR (((RTS.TypePK)=[Forms]![Query Form]![PK_CK])) OR (((RTS.TypeLabel)=[Forms]![Query Form]![Label_CK])) OR (((RTS.TypeDDMAC)=[Forms]![Query Form]![DDMAC_CK])) OR (((RTS.TypeRA)=[Forms]![Query Form]![RA_CK])) OR ((((([RTS].[CorrDate]) Between [Forms]![Query Form]![StartDate] And [Forms]![Query Form]![EndDate]) And (([RTS].[CorrSource])=[Forms]![Query Form]![Source]) And (([RTS].[CorrType])=[Forms]![Query Form]![Type]) And (([RTS].[SubmissionType])=[Forms]![Query Form]![SubmissionType]) And (([RTS].[ProdName])=[Forms]![Query Form]![Product]))<>False));
Thanks for the assistance!
The form has several combo boxes to pull values and several check boxes for selection.
It seems to work, but if I select:
Combo Box1: apples
Check Box1: Checked
The result is apples and oranges…there is a record with Oranges and ‘Check Box1’ is checked in the record.
My expected result was no record selected since ‘check box1’ has no value in the apples record.
This is the query I am using:
SELECT DISTINCT RTS.CorrDate, RTS.CorrSource, RTS.CorrType, RTS.SubmissionType, RTS.SerSupNo, RTS.ProdName, RTS.TypeCMC, RTS.TypePharmTox, RTS.TypePK, RTS.TypeLabel, RTS.TypeDDMAC, RTS.TypeRA, RTS.Comments
FROM RTS
WHERE (((RTS.CorrDate) Between [Forms]![Query Form]![StartDate] And [Forms]![Query Form]![EndDate])) OR (((RTS.CorrSource)=[Forms]![Query Form]![Source])) OR (((RTS.CorrType)=[Forms]![Query Form]![Type])) OR (((RTS.SubmissionType)=[Forms]![Query Form]![SubmissionType])) OR (((RTS.ProdName)=[Forms]![Query Form]![Type])) OR (((RTS.TypeCMC)=[Forms]![Query Form]![CMC_CK])) OR (((RTS.TypePharmTox)=[Forms]![Query Form]![PharmTOX_CK])) OR (((RTS.TypePK)=[Forms]![Query Form]![PK_CK])) OR (((RTS.TypeLabel)=[Forms]![Query Form]![Label_CK])) OR (((RTS.TypeDDMAC)=[Forms]![Query Form]![DDMAC_CK])) OR (((RTS.TypeRA)=[Forms]![Query Form]![RA_CK])) OR ((((([RTS].[CorrDate]) Between [Forms]![Query Form]![StartDate] And [Forms]![Query Form]![EndDate]) And (([RTS].[CorrSource])=[Forms]![Query Form]![Source]) And (([RTS].[CorrType])=[Forms]![Query Form]![Type]) And (([RTS].[SubmissionType])=[Forms]![Query Form]![SubmissionType]) And (([RTS].[ProdName])=[Forms]![Query Form]![Product]))<>False));
Thanks for the assistance!