Saving Data From Form to Access Database

daveg2811

New member
Joined
Jan 15, 2007
Messages
2
Programming Experience
1-3
I have a form where you add some details. I press save on the
BindingNavigatorSaveItem then I close the application. I open the application the data i have inputted has gone. Why is this?
 
I believe the BindingManagerSaveItem isn't wired to any event when the BindingManager is first added to a form. Have you added an event handler?
You can double click the Item in form design view and a new event handler will be created for you if one doesn't already exist. In the event handler, add the code to update the database. The structure of this code will depend on the structure of your application.
 
I have the code for it but its not updating. I enter the data, press save. It stays there until i close the application. Its when i run the application again and its gone
 
Are you using a dataset? If so, are you updating using the tableadapter?

otherwise the data will persist as long as the dataset exists, but will never be written to the database itself.

If not, enter the data, then while you still have the app running, open the mdb in access and see if the data is there. If it is, then ians explanation may be the answer.
 
Back
Top