Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating MS Access tables from Visual Basic 2008

Status
Not open for further replies.

Ken01

Programmer
Aug 8, 2014
60
GB
I am using the following code (as gleaned from a Microsoft website) to update a connected MS Access table. Although it does NOT trigger an error message
it does NOT update the table. I have also included a variable declaration from the Form_Load event.
Any help would be greatly appreciated.

Try
Me.TestTableAdapter.Update(Me.AphDb1DataSet3.Test)
Me.AphDb1DataSet3.Test.AcceptChanges()
Catch
MsgBox("Update NOT successful ! " & Err.Number)
End Try

---------------------------------------------------------------------------------------------------

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'AphDb1DataSet3.Test' table. You can move, or remove it, as needed.
Me.TestTableAdapter.Fill(Me.AphDb1DataSet3.Test)
End Sub
 
See if this applies.


You did not provide a lot of information so hard to say your issue. But if it is this issue it can be very confusing because it appears as if everything works, but then when you open the expected database nothing appears to have updated.
 
Thank-you for your reply. I tried the method suggested in the link but it made no difference.
 
I think the most likely reason is that I am using VB Express rather than the full version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top