1 Replies - 559 Views - Last Post: 13 April 2016 - 04:18 AM Rate Topic: -----

#1 carin25  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 06-April 16

save data from multiple textbox to datagrid

Posted 13 April 2016 - 02:45 AM

hello, I just wanna ask on how to save data from multiple textbox to datagrid.



here is my code:




Private Sub Command2_Click()
Dim value As String
value = text16.text & "," & text22.text & "," & text23.text & "," & text24.text


Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("date") = Text16.Text
Adodc1.Recordset.Fields("name") = Text12.Text
Adodc1.Recordset.Fields("Dept") = Text13.Text
Adodc1.Recordset.Fields("Position") = Text14.Text

Adodc1.Recordset.Fields("group") = value
Adodc1.Recordset.Update
Adodc1.Refresh
end sub





the problem is, it only save two data greater than that it show an error.

Is This A Good Question/Topic? 0
  • +

Replies To: save data from multiple textbox to datagrid

#2 andrewsw  Icon User is online

  • blow up my boots
  • member icon

Reputation: 6544
  • View blog
  • Posts: 26,525
  • Joined: 12-December 12

Re: save data from multiple textbox to datagrid

Posted 13 April 2016 - 04:18 AM

What error?

You should rename all your controls to something more meaningful than Text16, Text22, etc..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1