I have a MS Access database. If I want to create a function in VB6 that adding data into my data base by typing the new data on textbox and click the button. Is it possible.
How do i adding new data to my database? Hope to getting help from here. Thanks you very much
This is my code.... any problem? Why cant work?
Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Field(1).Value = InputBox("code")
Data1.Recordset.Update
End Sub
Private Sub Command6_Click()
Picture2.Cls
Data1.Recordset.MoveFirst
Do While Not Data1.Recordset.EOF
Picture2.Print Data1.Recordset![code]
Text5.Text = Text5.Text & " " & Data1.Recordset![code]
'Text5.Text = Data1.Recordset![code]
Data1.Recordset.MoveNext
Loop
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\menu1.mdb"
Data1.RecordSource = "Table1"
Data1.Refresh
Text1.DataField = "Code"
End Sub