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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Status Capture

Status
Not open for further replies.

gareth001

Technical User
Feb 4, 2003
43
GB
Hi,

I've got two forms, one for adding data and another to search for a record and allow it to be edited if needed. When a record has been edited, I need a msgbox to appear and confirm i want the changes made. However i can't find a property that works correctly or that i've been using correctly to let me know in VBA if a change has been made to the record before it is saved.

I've already been looking at the "recordstatus" property but with no luck.

Thanks for your help

Gareth
 
The before update event of bound form fires whenever there's an attempt to save, so you could use something like this:

[tt]if (msgbox("wanna save",vbokcancel+vbinformation,"save?")=vbcancel) then
cancel=true
end if[/tt]

You can also test the .Dirty property of the form (me.dirty), to check whether the record has unsaved changes or not at any time.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top