Because I am still kinda learning, I used a guide to help me make this program and I modified it to my personal needs. Everything that I have coded works except that when the user hits the edit button, they can edit the fields, and it appears to save when they click save, but it wont save the new information. Also, when I hit the "create new" button, it uses the data from the original entry that I put in. this is the save button code:
this is how I call the sub when the button is pressed.
Any ideas? I know the connection to the db is good because it is saving the fact that I added or deleted records, but it just wont save the information. Also.. on a side note, VB says the CASE statements may cause runtime time errors but allows me to build it regardless.
Code:
Private Sub Save()
[Update]
Try
Me.BindingContext(DataSet11, _
"information").EndCurrentEdit()
odaContacts.Update(DataSet11, _
"information")
Catch eSave As System.Exception
MessageBox.Show(eSave.Message)
End Try
[See custom procedures]
Me.DataSet11_PositionChanged()
[See custom procedures]
ReadOnlyOn()
End Sub
this is how I call the sub when the button is pressed.
Code:
Private Sub contacttoolbar_ButtonClick(ByVal sender As _
System.Object, ByVal e As _
System.Windows.Forms.ToolBarButtonClickEventArgs) _
Handles contacttoolbar.ButtonClick
[Use tag property to select button]
Select Case e.Button.Tag
Case "Add" This is the tag property
Add() This is the previously written Sub
Case "Edit"
Edit()
Case "Save"
Save()
SetNavButtons(sender, e)
Case "Clear"
Cancel()
SetNavButtons(sender, e)
Case "Email"
SendMail()
Case "Delete"
Delete()
Case "First"
NavFirst()
Case "Previous"
Previous()
Case "Next"
NavNext()
Case "Last"
NavLast()
Case "About"
About.Show()
Case "Help"
Help.Show()
Case "Exit"
Shutdown()
[Use tag property to select button/]
End Select
End Sub
Any ideas? I know the connection to the db is good because it is saving the fact that I added or deleted records, but it just wont save the information. Also.. on a side note, VB says the CASE statements may cause runtime time errors but allows me to build it regardless.