Hi,

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.

Hi,

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.

It's nothing.
I cannot write the codes for you here,cause it's pretty lengthy. So, you may write to me to my email address> mansoor_aslam@hotmail.it <
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.

So, you may write to me to my email address> mansoor_aslam@hotmail.it <

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:
With rs
.CursorLocation = adUseClient
.Open "SELECT * FROM table1", cn, adOpenStatic, adLockOptimistic ' cn is connection

.AddNew

!name = text1.Text
.Update ' update data
End With

so try it with your code what you use.

Kris,
The help that I have posted before on other thread can add, update, delete and refresh data on forms. Refer thread 'Retrieve username on all forms' started by you.
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.