Name: Anonymous 2010-04-28 13:24
Can anyone tell me how do I UPDATE a field in a access database connected to a Visual Basic application? It's connected with ADODB. I want to select the field which i want to modify from a datagrid and when I click a button to change the value of that field to -1.
I'm havin another problem caused by a combobox that gathers data from the database. If i add a new reccord the combobox items don't refresh. Here's the code for the combobox:
Private Sub combo_refresh()
With Combo1
For Counter = 1 To DataEnvironment1.rsDataTable.RecordCount
.AddItem Counter & ". " & DataEnvironment1.rsDataTable.Fields("Textul")
.ItemData(Combo1.NewIndex) = DataEnvironment1.rsDataTable.Fields("NR")
DataEnvironment1.rsDataTable.MoveNext
Next
End With
End Sub
I'm havin another problem caused by a combobox that gathers data from the database. If i add a new reccord the combobox items don't refresh. Here's the code for the combobox:
Private Sub combo_refresh()
With Combo1
For Counter = 1 To DataEnvironment1.rsDataTable.RecordCount
.AddItem Counter & ". " & DataEnvironment1.rsDataTable.Fields("Textul")
.ItemData(Combo1.NewIndex) = DataEnvironment1.rsDataTable.Fields("NR")
DataEnvironment1.rsDataTable.MoveNext
Next
End With
End Sub