Dobio sam ovu gresku kada treba da iz baze ubaci u listu
Evo koda koji vrsi to prebacivanje.
Dim str As String
If Text1.Text = Empty Or IsNumeric(Text1.Text) <> True Then
MsgBox "Unesite broj!", vbOKOnly, "Warning"
Else
str = Adodc2.Recordset.Fields("Naziv").Value + " " + Adodc2.Recordset.Fields("Cena").Value + " " + Text1.Text
List1.AddItem str
List2.AddItem Adodc2.Recordset.Fields("Cena").Value * Text1.Text
cenax = Label4.Caption
cenax = cenax + (Adodc2.Recordset.Fields("Cena").Value * Text1.Text)
Label4.Caption = cenax
Text4.Text = Label4.Caption
Adodc2.Recordset.Fields("Prodano").Value = Val(Adodc2.Recordset.Fields("Prodano").Value) + Val(Text1.Text)
List3.AddItem Text1.Text
End If
End Sub
|