I want a query ms_access in vb.net to search between two different times. Compilation of the drug items in quantities during the period for each group
My attempt does not do what is required.
The sum is shown for all the elements together, not each element.

  Dim A = Format(DATETIM_START.Value, "yyyy/MM/dd")
            Dim B = Format(DATETIM_END.Value, "yyyy/MM/dd")
            Select    MEDICALPRO_NAME ,(Select SUM(MEDICALPRO_LEAVEM) FROM MEDICALPRO_TB Where MEDICALPRO_CHECK = True    And (((MEDICALPRO_DATEEND) between #" & B & "# And #" & A & "#))  ) As Total_quantities  FROM MEDICALPRO_TB  GROUP BY MEDICALPRO_NAME"
