как я могу извлечь значения, хранящиеся в переменном ВСУМЕ многоканальная линии в одном MsgBox InstEd из retrive в несколько MsgBox один за одниммульти значение линии в MsgBox
Dim rSEL, rSUM, rDes As DAO.Recordset
Dim vItem_id, vQnty, vSum As Integer
Dim vDes As String
If Not IsNull(itemId) And Not IsNull(qnty_in) Then
If qnty_in <= 0 Or qnty_in > balance Or IsNull(balance) Then
Cancel = True
End If
Set rSEL = CurrentDb.OpenRecordset("SELECT item_id,item_qnty
FROM basketQnty_tbl WHERE basket_id=" & basketId)
'Check to see if the recordset actually contains rows
If Not (rSEL.EOF And rSEL.BOF) Then
rSEL.MoveFirst
Do Until rSEL.EOF
'Save itemId into a variable
vItem_id = rSEL!item_id
vQnty = (rSEL!item_qnty) * qnty_in
Set rSUM = CurrentDb.OpenRecordset("SELECT sum(qnty_in*qnty_type)
as QN FROM sales_tbl WHERE itemid=" & vItem_id)
Set rDes = CurrentDb.OpenRecordset("SELECT itemDesc
FROM items_main WHERE itemId=" & vItem_id)
vSum = rSUM!QN
vDes = rDes!itemDesc
'Move to the next record. Don't ever forget to do this.
If vQnty > vSum Then
MsgBox "you have only (" & vSum & ") of Item (" & vDes & ") in the stock"
Cancel = True
End If
rSEL.MoveNext
Loop
End If
rSEL.Close
End If
как я могу решить эту проблему?!
StringBuilder не включают – user1364008
Добавить 'Использование System.Text' –
как опишите, пожалуйста, меня?! – user1364008