K
Kitty
I have a form where the user selects from two options. A
SQL query runs depending upon which option is selected.
In the SQL below, the last section (WHERE) is not
executing properly. Only the first part of the OR
statement is working - the query is not checking for the
second date. I designed the query using the query
designer, then copied it from the SQL view.
Any assistance is appreciated. Thank you!
Kitty
DoCmd.RunSQL "INSERT INTO tblYBSConcurrenceTesting (
BRANCH, ENT_CODE, CIF_NUMBER, LOAN_NUMBR, SHORT_NAME,
VOLUME, Association, Open_Date, LAST_RNWL )" & _
"SELECT tblLRMF.BRANCH, tblLRMF.ENT_CODE,
tblLRMF.CIF_NUMBER, tblLRMF.LOAN_NUMBR, blLRMF.SHORT_NAME,
tblLRMF.VOLUME, tblReviewGeneralInformation.ASSOCIATION,
tblLRMF.OPEN_DATE, tblLRMF.LAST_RNWL " & _
"FROM (tblYBSCIF INNER JOIN tblLRMF ON
tblYBSCIF.CIF_NUMBER = tblLRMF.CIF_NUMBER) INNER JOIN
tblReviewGeneralInformation ON tblLRMF.ASSN =
tblReviewGeneralInformation.ASSN " & _
"WHERE (((tblLRMF.OPEN_DATE)>#12/31/2000#) OR
((tblLRMF.LAST_RNWL)>#12/31/2000#));"
SQL query runs depending upon which option is selected.
In the SQL below, the last section (WHERE) is not
executing properly. Only the first part of the OR
statement is working - the query is not checking for the
second date. I designed the query using the query
designer, then copied it from the SQL view.
Any assistance is appreciated. Thank you!
Kitty
DoCmd.RunSQL "INSERT INTO tblYBSConcurrenceTesting (
BRANCH, ENT_CODE, CIF_NUMBER, LOAN_NUMBR, SHORT_NAME,
VOLUME, Association, Open_Date, LAST_RNWL )" & _
"SELECT tblLRMF.BRANCH, tblLRMF.ENT_CODE,
tblLRMF.CIF_NUMBER, tblLRMF.LOAN_NUMBR, blLRMF.SHORT_NAME,
tblLRMF.VOLUME, tblReviewGeneralInformation.ASSOCIATION,
tblLRMF.OPEN_DATE, tblLRMF.LAST_RNWL " & _
"FROM (tblYBSCIF INNER JOIN tblLRMF ON
tblYBSCIF.CIF_NUMBER = tblLRMF.CIF_NUMBER) INNER JOIN
tblReviewGeneralInformation ON tblLRMF.ASSN =
tblReviewGeneralInformation.ASSN " & _
"WHERE (((tblLRMF.OPEN_DATE)>#12/31/2000#) OR
((tblLRMF.LAST_RNWL)>#12/31/2000#));"