473,383 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Ms Flexgrid vb6

Dear Sir/mam
I am making inventory management i have problem during when i update sale/purchase invoice it can not update sale/purchase invoice. my code is below please check it can you help me where is mistake and when i complie my programe it does not gives me any error
please help me
bir is msflexgrid
i am writting code in vb6
thanks
mac

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Command4_Click()
  3. Dim dd1 As Database
  4. Dim mi1 As Recordset
  5. Dim mi2 As Recordset
  6. Dim count As Integer
  7. Dim gg As Variant
  8. dbname = App.Path + "\data\database.mdb"
  9. Set dd1 = OpenDatabase(dbname)
  10. Set mi1 = dd1.OpenRecordset("select * from purchase where purid= '" & Combo1.Text & "'")
  11. Set mi2 = dd1.OpenRecordset("select * from purchase where purid= '" & Combo1.Text & "'")
  12. bir.Row = 1
  13. bir.Col = 0
  14. If bir.Text = "" Then
  15. MsgBox "Please enter complete detail.", vbExclamation
  16. Else
  17. For count = 1 To bir.Rows - 2
  18. bir.Row = count
  19. mi1.Edit
  20. bir.Col = 0
  21. mi1.Fields("proid") = bir.Text
  22. bir.Col = 1
  23. mi1.Fields("name") = bir.Text
  24. bir.Col = 2
  25. mi1.Fields("packing") = bir.Text
  26. bir.Col = 3
  27. mi1.Fields("packtype") = bir.Text
  28. bir.Col = 4
  29. mi1.Fields("weight") = bir.Text
  30. bir.Col = 5
  31. mi1.Fields("ip") = bir.Text
  32. bir.Col = 6
  33. mi1.Fields("tp") = bir.Text ' purqty 'purbonus
  34. bir.Col = 7
  35. mi1.Fields("purqty") = bir.Text
  36. bir.Col = 8
  37. mi1.Fields("purbonus") = bir.Text
  38. bir.Col = 9
  39. mi1.Fields("disper") = bir.Text
  40. bir.Col = 10
  41. mi1.Fields("disrs") = bir.Text
  42. bir.Col = 11
  43. mi1.Fields("wto") = bir.Text
  44. bir.Col = 12
  45. mi1.Fields("total") = bir.Text
  46. bir.Col = 13
  47. mi1.Fields("discount") = bir.Text
  48. bir.Col = 14
  49. mi1.Fields("netamount") = Val(bir.Text)
  50. bir.Col = 15
  51. mi1.Fields("bonusamount") = Val(bir.Text)
  52. bir.Col = 16
  53. mi1.Fields("wtoamount") = Val(bir.Text)
  54. 'bir.Col = 17
  55. mi1.Fields("purid") = Combo1.Text
  56. mi1.Fields("purdate") = Label2.Caption
  57. mi1.Fields("company") = Label6.Caption
  58. mi1.Fields("supaddress") = Label7.Caption
  59. mi1.Fields("supphone") = Label8.Caption
  60. mi1.Fields("supfax") = Label15.Caption
  61. mi1.Fields("supemail") = Label11.Caption
  62. mi1.Fields("supwebsite") = Label12.Caption
  63. mi1.Fields("groupname") = Label10.Caption
  64. mi1.Fields("guid") = Label16.Caption
  65. mi1.Fields("comid") = Label14.Caption
  66. mi1.Update
  67. Next
  68. bir.Clear
  69. 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"
  70. bir.Rows = 2
  71. End If
  72. Unload Me
  73. Me.Show
  74. End Sub
  75.  
Jan 18 '14 #1
2 2066
zmbd
5,501 Expert Mod 4TB
By, simply stating that your code "doesn't work," along with code that appears to have had very little if any troubleshooting performed, and expecting someone to help doesn't usually result in much of an answer.

Instead please tell us what you were expecting to happen, what actually happened, what steps have YOU taken to trouble shoot the code.
Jan 19 '14 #2
Dear zmbd
thanks for reply. actually i wanted when i change some it should change in database also. but it can not change in dabase file. for example i load invoice and i chande some item or delete iten when i click save then it is not save data in database file
thanks
mac
Jan 19 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: tombsy | last post by:
Hi gang... I want to have a form that can display data from a datasource that is not fixed. lets say a crosstab query that can change the number of colums and field headings depending on the...
4
by: VR | last post by:
I am trying to embed a check box into a FlexGrid's cell, but having a problem when I start scrolling the grid. Here is my MyCheckBox class... class MyCheckBox : CheckBox { void Init (...
9
by: JFB | last post by:
Hi All, I have a edit flexgrid, after to fill with different rows manually. How can I insert the rows of my flexgrid to my table (sql server) using ado.net? Any example? I can insert one row...
0
by: Xavier Valdés | last post by:
Hi all, I'm using component one's flexgrid (nonclassic) and I have a question... How could I drag and drop ROWS??? (from a component with my flexgrid and another component with flexgrid)...
3
by: Xavier Valdés | last post by:
Hi all, I'm using component one's flexgrid (nonclassic) and I have a question... How could I drag and drop ROWS??? (from a component with my flexgrid and another component with flexgrid)...
4
by: fripper | last post by:
I have replaced an older machine with a new one and have moved a VB .Net program that I worte on the old machine to the new one. The program uses a FlexGrid control for displaying some stuff in a...
5
by: schapopa | last post by:
I have a flex grid and I am loading data to this flex grid in this way While sqldr.Read j = j + 1 MSFlexGrid1PLSummary.set_TextMatrix(MSFlexGrid1PLSummary.Row, MSFlexGrid1PLSummary.Col,...
0
by: alexh1000 | last post by:
When I insert the FlexGrid control in a dialog (using controls toolbar) the dialog fails to open on program execution(DoModal returns a -1). If I remove the FlexGrid from the dialog, the dialog...
3
by: sweevil | last post by:
I'm converting a VB6 project to .Net2005. One of the items encountered was setting the cellpicture onto a flexgrid from an imagelist. The image background doesn't appear to render correctly. I...
3
by: ArmageddonAsh | last post by:
I'm trying to make an application that will allow the user to enter data into a flexgrid (that's done) and then save the data from that flexgrid into a CSV file but even though the file is made none...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.