M
Membre supprimé 1
Invité
Hi,
Please I have some compilation error when i call a date in my sql query on an access data base. It seems the syntax is not correct. can any one help? below is the code: str_temp_1 and str_temp_3 are defined as date
Connexion1
ens1.Open "SELECT Sum([POSTING]![SHARES]+[POSTING]![DEPOSIT]+[POSTING]![SAVING]+[POSTING]![SALARY]+[POSTING]![MISC_AMT]) AS TOTPOST From POSTING WHERE (((POSTING.FK_TILT_ID)='" & str_code_caisse & "') AND ((POSTING.COMMIT_DT)>=#" & str_temp_1 & "# And (POSTING.COMMIT_DT)<= #" & str_temp_3 & "#));", bse1
vartot_post = ens1!TOTPOST
ens1.close
Please I have some compilation error when i call a date in my sql query on an access data base. It seems the syntax is not correct. can any one help? below is the code: str_temp_1 and str_temp_3 are defined as date
Connexion1
ens1.Open "SELECT Sum([POSTING]![SHARES]+[POSTING]![DEPOSIT]+[POSTING]![SAVING]+[POSTING]![SALARY]+[POSTING]![MISC_AMT]) AS TOTPOST From POSTING WHERE (((POSTING.FK_TILT_ID)='" & str_code_caisse & "') AND ((POSTING.COMMIT_DT)>=#" & str_temp_1 & "# And (POSTING.COMMIT_DT)<= #" & str_temp_3 & "#));", bse1
vartot_post = ens1!TOTPOST
ens1.close