saving array of text5(i).text

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2006
Posts: 26
Reputation: vbcielle is an unknown quantity at this point 
Solved Threads: 0
vbcielle vbcielle is offline Offline
Light Poster

saving array of text5(i).text

 
0
  #1
Sep 13th, 2007
i have a search program that when searched i will make a receipt, a reciept form will be displayed, the
1st item searched will be displayed on text1(0).text and the quantity also will be displayed in text5(0).text
my problem is how to subtract the stock items minus the quantity text5(0).text(its an array of text5(i).text
in frmsearch i have this for a code:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1.  
  2. repeat = 1
  3.  
  4. If Adodc1.Recordset.RecordCount > 0 Then
  5. Ono1 = Adodc1.Recordset.Fields("Price")
  6. Ono2 = Adodc1.Recordset.Fields("Carmodel")
  7. Ono6 = Adodc1.Recordset.Fields("Category")
  8. Ono3 = Adodc1.Recordset.Fields("PartNo2")
  9. Ono4 = Adodc1.Recordset.Fields("CarApp")
  10. Ono5 = Adodc1.Recordset.Fields("Year")
  11. stock = Adodc1.Recordset.Fields("Stocks")
  12. For i = 0 To 4
  13. If repeat = 1 Then
  14. Do While frmReciept.Text4(i).Text = "" And frmReciept.Text6(i).Text = ""
  15.  
  16. frmReciept.Text4(i).Text = Ono2 & " " & Ono6 & " " & Ono3 & " " & Ono4 & " " & Ono5
  17. repeat = 0
  18. frmReciept.Text6(i).Text = Ono1
  19. frmReciept.Text5(i).Text = 1
  20. Loop
  21. End If
  22. Next i
  23. End If
  24.  
  25. frmReciept.Show
in frmReciept i have this for a code
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1.  
  2. frmReciept.Adodc3.ConnectionString = "Provider=Microsoft.jet.oledb.4.0;data source=" & App.Path & "\MBMKDbase.mdb"
  3. frmReciept.Adodc3.RecordSource = "SELECT * FROM CustDbase"
  4. frmReciept.Adodc3.CommandType = adCmdText
  5. frmReciept.Adodc3.Refresh
  6.  
  7. If frmReciept.Text4(i).Text <> "" And frmReciept.Text6(i).Text <> "" Then
  8.  
  9. With frmReciept.Adodc3.Recordset
  10. .AddNew
  11. .Fields("CustName") = frmReciept.Combo6.Text
  12. .Fields("InvoiceNo") = frmReciept.Text8.Text
  13. .Fields("PONo") = frmReciept.Text10.Text
  14. .Fields("Date") = frmReciept.txtDate.Text
  15. .Fields("QtY") = frmReciept.Text5(i).Text
  16. .Fields("Product") = Label17.Caption & "," & Label18.Caption 'Text4(i).Text
  17. .Fields("Price") = frmReciept.Text6(i).Text
  18. .Fields("Total") = frmReciept.Text3.Text
  19. .Update
  20. End With
  21. End If
i want that everytime i add a product in the receipt, the stocks of that particular item will deducted with the quantity purchased
(frmReciept.Text5(i).Text) can anyone help
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC