Rabu, 13 Juli 2011

[MS_AccessPros] Me.dirty not saving changes after initial save

 

Hello all,

I have a bound form that displays information from several different tables. It's record source is a query. When I change some of the data, I have a Save button that becomes visible with an on click event to save the changes. It's code is:
If Me.Dirty Then
Me.Dirty = False
'display splash form "Record has been saved" which closes automatically
DoCmd.OpenForm "frmRecordIsSaved", acNormal
Me.cboLookup.SetFocus
Me.btnSave.Visible = False
Me.Refresh
End If

This works fine for the first record that is changed. However, after I have saved one record and display another and change something the procedure doesn't save the changes. It gives no errors, the form is refreshed and the changes are gone. Thinking I might have form corruption, I built a new form and it is doing the same thing. I went to prepare a sample for uploading and after deleting all the extra forms, reports and etc. and importing the tables from the backend into the front end, the behavior stopped and it started working perfectly. I'm bum-fuzzled. Does anyone have a clue as to why this might be happening?

Doyce

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar