There is a table showing the types of medicines and the serial for each type of medicine.
There is a column for the quantity received from the item and another for the quantity spent from the item.
There is a column for the date and the last boolean value to delete and hide the element by not setting true
database access 2010 code vb.net .
MEDICALCOME_CODE : Item Code
MEDICALCOME_SERIAL : Company serial
MEDICALCOME_NAME : Item name
MEDICALCOME_COM :Incoming quantity
MEDICALCOME_LEAVE :outgoing quantity
MEDICALCOME_CHECK : Checking a boolean value to use by deleting and archiving
I want to sum the period between two dates DateTimePicker - for the total incoming - and outgoing - and the difference between the incoming and outgoing remaining:
Is it possible to inquire within a month? And clarification of the details of the quantities disbursed for four weeks for the same month
I used the following code to search and group between two different date periods. Nothing appears
Dim A = Format(DATETIM_START.Value, "yyyy/dd/MM")
Dim B = Format(DATETIM_END.Value, "yyyy/dd/MM")
Dim DataAdapter As New OleDbDataAdapter("Select MEDICALCOME_TB.MEDICALCOME_CODE, MEDICALCOME_TB.MEDICALCOME_SERIAL, Sum(MEDICALCOME_TB.MEDICALCOME_COM) As SumOfMEDICALCOME_COM, Sum(MEDICALCOME_TB.MEDICALCOME_LEAVE) As SumOfMEDICALCOME_LEAVE
Where (((MEDICALCOME_TB.MEDICALCOME_CHECK) = True) And ((MEDICALCOME_TB.MEDICALCOME_DATE)between #" & B & "# And #" & A & "#))
Group By MEDICALCOME_TB.MEDICALCOME_CODE, MEDICALCOME_TB.MEDICALCOME_SERIAL ;", con)
The query works when canceling the search condition between two dates
But I need to display the date during the month - and sum the quantities disbursed in the first week - and the second, third and fourth week of the same month.