Below are two parameter queries that are causing me some trouble.
1. SELECT qryAddress.*, tblDonationDetail.fldDate, tblDonation.fldKind, tblDonation.fldFund, tblDonor.fldGroup, tblDonationDetail.fldKindNbr, tblDonationDetail.fldAmount, tblDonationDetail.fldComment, tblDonor.fldCode, tblDonor.fldGroup, tblDonor.fldFirstName, tblDonor.fldLastName FROM (tblDonor INNER JOIN qryAddress ON tblDonor.fldID = qryAddress.fldID) INNER JOIN (tblDonation INNER JOIN tblDonationDetail ON tblDonation.fldID = tblDonationDetail.fldDonationID) ON tblDonor.fldID = tblDonationDetail.fldDonorID WHERE (((tblDonationDetail.fldDate) Between Forms!frmSearch!txtStartDate And Forms!frmSearch!txtEndDate) And ((tblDonor.fldCode)=Forms!frmSearch!lstDonorCode));
2. SELECT qryAddress.fldStreet, qryAddress.fldCity, qryAddress.fldState, qryAddress.fldZip, tblPerson.fldFirstName, tblPerson.fldLastName, tblPerson.fldFamilySize, IIf([fldFamilySize]=1,"Individual","Family") AS [Family Type], tblDonation.fldDate, tblPerson.fldCode, tblDonation.fldFund, tblDonation.fldAmount, tblDonation.fldRemark FROM (tblPerson INNER JOIN qryAddress ON tblPerson.fldID = qryAddress.fldID) INNER JOIN tblDonation ON tblPerson.fldID = tblDonation.fldPersonID WHERE (((tblDonation.fldDate) Between [Forms]![frmDonationPrecise]![txtStartDate] And [Forms]![frmDonationPrecise]![txtEndDate]) AND ((tblPerson.fldCode)=[Forms]![frmDonationPrecise]![cmbCode]));
The 1st takes in 2 parameters, date, donor code, and all other fields listed and reports correct results. The 2nd gives results for all donors with the date parameter alone, although I need its associated report to give both parameters.
Could you please look and advise me? Thank you for your assistance with this puzzle.
Should you need more info, just ask.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.