Rabu, 13 Juli 2011

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

 

Hi Doyce,

what is the SQL for the query?

do you have fields in the table design :
- designated as Required?
- text fields with no for AllowZeroLength?
- DefaultValue specified when it should be blank (especially check numeric foreign keys)

what unique indexes are on the table(s) in the query?

~~~
this attempts to save the record:
Me.Dirty = False

Do you have a form BeforeUpdate event?

although it is cheap, after I do me.dirty = false, I test it again. For now, this might be a good idea till you can figure out why the record isn't saving -- at least your message won't tell the user it is saved.

Warm Regards,
Crystal

*
(: have an awesome day :)
*

--- On Wed, 7/13/11, dnwinberry wrote:

> 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