If barcode_product were xxxxxx and date1 were 3/1/09 and date2 were 3/15/09, then
- nz(DSum("Total","fuel_move","id_fuel_move='" & barcode_product & "'" & "and date_fuel_move between" & [date1] And [date2] ),0) AS sofuel
with substitutions would be
- nz(DSum("Total","fuel_move","id_fuel_move='xxxxxx'and date_fuel_move between0),0) AS sofuel
Without going any further into the problem, I see several syntax errors here. I'm using the ~ as a delimeter to avoid confusion with the single and double quotes that already appear in the statement.
1) There needs to be a blank between ~'xxxxxx'~ and ~"and date_..."~ so change to ~" and date_. . ."~
2) ~[date1] and [date2]~ will evaluate to False, or 0 unless both dates are the same, then it will evaluate to True. The center ~And~ needs to be ~ & " And " & ~
3) Date values need the delimeter "#" so they are correctly intrepreted as dates, and not arithemetic operations. ~[date1]~ should be ~" #" & [date1] & "#"~ ~[date2]~ needs similar changes.