I want to update records in the access table which is connected to vb.
Can somebody give code for that please.
(ie)when i click add button the entered fields should get updated in the tables and the form should be refreshed again to enter datas.
I cannot write the codes for you here,cause it's pretty lengthy. So, you may write to me to my email address> firstname.lastname@example.org <
Let me know the names of the Fields that you have in your Database.
Also, I recommnend you not to use the Autonumbers on the Table to save the records in the MS Access, cause you'll have problems if you happened to delete any saved record.
don't use private email. its not fair. by the way, when enter data by code and you write code for enter its automatically update data. like:
.CursorLocation = adUseClient
.Open "SELECT * FROM table1", cn, adOpenStatic, adLockOptimistic ' cn is connection
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...