We help IT Professionals succeed at work.

Updating a record on a bound continuous form

Rich asked
I have a continuous form that is bound to a temporary table. When I open the form, in the on_load event, I populate this table with various SQL calls and then at the end of he on_load event, I do a Me.Requery and Me.Refresh. This puts the table contents on the screen in my continuous form. However, I am trying to figure out how to update the record when I change data. So far, I see that if I make my data changes and then move to another record on the form, then the updates work, but if I only have one record showing, there is no other record to go to and how do I get the data to update? (I have the AllowAdditions set to false, since I don't want users to be able to add records through this form.) I have added a button to the record called Update, but I am not sure what code to put in it to update the table?
Watch Question

In the OnClick event of your Update button, try this:
Dirty = False.

Also you don't need to have both requery and refresh in your load event.  A requery would suffice.

Also note that if you make any change to data in a bound form, the record will be updated no matter how you move away from that record- so moving to a different record saves the current chnages (as you already know) but also closing the form, closing the application or closing Access will also cause the current record to be saved.
So unless you actively undo the changes they will be saved.


Thank you, that did it.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.