Rabu, 13 Juli 2011

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

 

Hi Crystal,

Thanks for responding. Here is the SQL for the query:

SELECT tblReconPrimary.UnitID, tblReconPrimary.ArrivalDate, tblReconPrimary.PComments, tblReconPrimary.PROGRAM, tblReconPrimary.LicREquest, tblReconPrimary.[Loaded Comments], tblReconPrimary.ShipDocPrinted, tblReconPrimary.Proccessed, tblReconPrimary.DateProcessed, tblReconPrimary.RegReceived, tblTruckloadTagDate.TagDate, tblTruckloadTagDate.Comments, tblTruckloadDeliveryLocations.[DELIVERY ID], tblTruckloadDeliveryLocations.DELIVERYLOCATION, tblTruckloadDelivery.[Delivery Date], tblCTLVINs.[License State], tblCTLVINs.[License Plate Number], tblCTLVINs.Year, tblCTLVINs.Make, tblCTLVINs.[Serial Number], tblTruckloadDeliveryLocations.DELIVERYLOCATION, tblTruckloadDelivery.TruckID, tblTruckloadTagDate.SuspensionSerialNumber
FROM tblTruckloadDeliveryLocations RIGHT JOIN (((tblReconPrimary LEFT JOIN tblTruckloadDelivery ON tblReconPrimary.UnitID = tblTruckloadDelivery.[Unit #]) LEFT JOIN tblCTLVINs ON tblReconPrimary.UnitID = tblCTLVINs.[Old Number]) LEFT JOIN tblTruckloadTagDate ON tblReconPrimary.UnitID = tblTruckloadTagDate.UnitID) ON tblTruckloadDeliveryLocations.[DELIVERY ID] = tblTruckloadDelivery.DeliveryID;

Here are the tables and their PK's:

tblReconPrimary - UnitID
tblTruckloadTagDate - UnitID
tblTruckloadDelivery - Unit#
tblTruckloadDeliveryLocations - Delivery ID
tblCTLVins - Old Number

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

The query is updateable.

'Do you have a form BeforeUpdate event? NO

I appreciate you taking the time to help!!

Doyce

--- In MS_Access_Professionals@yahoogroups.com, Crystal <strive4peace2008@...> wrote:
>
> 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