vba - run time error 2465 -


i getting error in ms access 2003, run time error 2465: microsoft can't find field '|' referred in expression.

count = dcount("*", "prepayment_pricing_change", ([insert_date] - int([insert_date])) = ([now()] - int([now()]))) db.execute "insert tbl_audit ([filepath],[filename],[action],[trans_date],[button],[number_of_records])" _        & " values ( '" & strfname & "', '" & file & "'  , ""'import_of_nts_rate_pcd_file'""  ,now() ,""'import nts rates file'"",'" & count & "');" 

i think forgot " in dcount condition:

count = dcount("*", "prepayment_pricing_change", "([insert_date] - int([insert_date])) = ([now()] - int([now()]))") 

also try escape variables:

db.execute "insert tbl_audit ([filepath],[filename],[action],[trans_date],[button],[number_of_records])" _        & " values ( '" & replace(strfname,"'","''") & "', '" & replace(file,"'","''") & "'  , ""'import_of_nts_rate_pcd_file'""  ,now() ,""'import nts rates file'"",'" & count & "');" 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -