• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 600
  • Last Modified:

Updating a record on a bound continuous form

Hi,
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?
0
Rich
Asked:
Rich
1 Solution
 
IrogSintaCommented:
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.
0
 
peter57rCommented:
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.
0
 
RichAuthor Commented:
Thank you, that did it.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now