Hi Experts
I am making one form where purchase order done and after that goods will be received fully or partially attached is sample in which i am trying to code on buton
when QTYreceived filled and then user click on button , then filled quntity received rows should be sum up in "Sumqtyrceived" field like "Sumqtyrceived=Sumqtyrceived+QTYreceived"
because Quantity are received partially and recorded in system
I am new in codes
please help
is there any sample of accdb from where i can learn and apply i have searched in googles but codes are very difficult to understand
respects your precious tiime
Form Name PO and below code tried from the google
Private Sub Command21_Click()
Dim strSQL As String
Dim rs As DAO.Recordset
strSQL = "SELECT PO.PO, PO.GRN, PO.ProductName, PO.Price, PO.QTYOrder, PO.TotalPrice, PO.QTYRecived, PO.SumQTYRecived " & _
"FROM PO " & _
"GROUP BY PO.PO, PO.GRN, PO.ProductName, PO.Price, PO.QTYOrder, PO.TotalPrice, PO.QTYRecived, PO.SumQTYRecived " & _
"HAVING (((PO.PO)=[Forms]![PO]![PO1])); "
Set rs = CurrentDb.OpenRecordset(strSQL)
With rs
If Not .BOF And Not .EOF Then
.MoveLast
.MoveFirst
While (Not .EOF)
SumQTYRecived = SumQTYRecived + QTYRecived
QTYRecived = 0
Wend
End If
.Close
End With
ExitSub
Set rs = Nothing
Exit Sub
Resume ExitSub
End Sub
After this issue solved i want to transfer whole data filed in GRN table because PO is updated frquenty with new grn number on partial received of quantity