Re: Problem with Filter/Query

From: Ed the Redhead (EdtheRedhead_at_discussions.microsoft.com)
Date: 07/27/04


Date: Tue, 27 Jul 2021 09:46:47 -0700

The SQL statement is this:

SELECT tblCertificates.ceCertificateID, tblCertificates.ceAgencyNumber, tblCertificates.ceAgentNumber, tblCertificates.ceFName, tblCertificates.ceMInitial, tblCertificates.ceLName, tblCertificates.ceSuffix, tblCertificates.ceDOB, tblCertificates.ceEffectiveDate, tblCertificates.cePlan, tblCertificates.ceUnits, tblCertificates.ceStatus, tblCertificates.ceChangeDate, tblCertificates.ceHomeAddress, tblCertificates.ceHomeCity, tblCertificates.ceHomeState, tblCertificates.ceHomeZip, tblCertificates.ceHomePhone, tblCertificates.ceSSN
FROM tblCertificates
GROUP BY tblCertificates.ceCertificateID, tblCertificates.ceAgencyNumber, tblCertificates.ceAgentNumber, tblCertificates.ceFName, tblCertificates.ceMInitial, tblCertificates.ceLName, tblCertificates.ceSuffix, tblCertificates.ceDOB, tblCertificates.ceEffectiveDate, tblCertificates.cePlan, tblCertificates.ceUnits, tblCertificates.ceStatus, tblCertificates.ceChangeDate, tblCertificates.ceHomeAddress, tblCertificates.ceHomeCity, tblCertificates.ceHomeState, tblCertificates.ceHomeZip, tblCertificates.ceHomePhone, tblCertificates.ceSSN
HAVING (((tblCertificates.ceCertificateID)=[Forms]![frmSearchFunctions]![txtActiveCertificateNo]));

I also realized as I reviewed these posts, that I accidentally copied the wrong VBA code originally. The actual code is:

DoCmd.OpenForm "frmCertificates", , "qryCertificatesEditFilterFromSearchScreen"
DoCmd.Maximize

It is exactly the same code, but it's for a different form. I don't program in SQL, so the actual qry is set-up on the qry page.