Dear friends
i am making inventory management i have one problem when i have purchase product form its working successufully. other form is edit purchase order. when i click update it does not save. please any one can help me? here is code

private cmdsave_click()
Dim dd1 As Database
Dim mi1 As Recordset
Dim count As Integer
Dim gg As Variant
dbname = App.Path + "\data\database.mdb"
Set dd1 = OpenDatabase(dbname)
Set mi1 = dd1.OpenRecordset("select * from purchase")
bir.Row = 1
bir.Col = 0
    If bir.Text = "" Then
MsgBox "Please enter complete detail.", vbExclamation
Else

For count = 1 To bir.Rows - 2
    bir.Row = count
mi1.Edit
    bir.Col = 0
    mi1.Fields("proid") = bir.Text
    bir.Col = 1
    mi1.Fields("name") = bir.Text
    bir.Col = 2
    mi1.Fields("packing") = bir.Text
    bir.Col = 3
    mi1.Fields("packtype") = bir.Text
    bir.Col = 4
    mi1.Fields("weight") = bir.Text
    bir.Col = 5
    mi1.Fields("ip") = bir.Text
    bir.Col = 6
    mi1.Fields("tp") = bir.Text 
    bir.Col = 7
    mi1.Fields("purqty") = bir.Text
    bir.Col = 8
    mi1.Fields("purbonus") = bir.Text
    bir.Col = 9
    mi1.Fields("disper") = bir.Text
    bir.Col = 10
    mi1.Fields("disrs") = bir.Text
    bir.Col = 11
    mi1.Fields("wto") = bir.Text
    bir.Col = 12
    mi1.Fields("total") = bir.Text
    bir.Col = 13
    mi1.Fields("discount") = bir.Text
    bir.Col = 14
    mi1.Fields("netamount") = Val(bir.Text)
bir.Col = 15
mi1.Fields("bonusamount") = Val(bir.Text)
bir.Col = 16
mi1.Fields("wtoamount") = Val(bir.Text)
'bir.Col = 17

mi1.Fields("purid") = Combo1.Text
mi1.Fields("purdate") = Label2.Caption
mi1.Fields("company") = Label6.Caption
mi1.Fields("supaddress") = Label7.Caption
mi1.Fields("supphone") = Label8.Caption
mi1.Fields("supfax") = Label15.Caption
mi1.Fields("supemail") = Label11.Caption
mi1.Fields("supwebsite") = Label12.Caption
mi1.Fields("groupname") = Label10.Caption
mi1.Fields("guid") = Label16.Caption
mi1.Fields("comid") = Label14.Caption

mi1.Update
Next
bir.Clear
bir.FormatString = "Item No | Item Name |Pack Size |Pack Type |Weight |I.Price |T.Price |Qty |Bonus |Dis % |Dis $ |W T O |TOTAL |DISCOUNT |NET AMOUNT |BONUS AMOUNT |WTO AMOUNT"
bir.Rows = 2
End If
Unload Me
Me.Show

End Sub

thanks you very much
mac
maccomputersolutions@yahoo.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.