Happy Friday All!
My issue: I have a DLookup-After Update event on a continuous subform that will not allow me to edit the values and continue
to the next row. I can edit the record persay but when attempting to move on to the next row in the subform to pull another
record, it tries to save the current record as a new record to the table (duplicating the value) rather than simply updating
the existing information. It then generates an error about duplicate values.
What the form does: The main form act as a manifest. Each row of my subform has a property item, to which belong to separate
individuals. The manifest has a date indicating what date the items were sent out along with other individuals property. For
Main Form Data:
Sent By : Steve
BagNum: 77878, DateIn 1/2/13, PropertyTypeID 1, DetentionID 28999, PropertyID 33
BagNum: 77879, DateIn 1/1/13, PropertyTypeID 2, DetentionID 32998, PropertyID 34
BagNum: 77881, DateIn 12/1/12, PropertyTypeID 1, DetentionID 31959, PropertyID 35
BagNum: 77876, DateIn 1/1/13, PropertyTypeID 1, DetentionID 38919, PropertyID 39
*bold indicates text boxes
I have a main form [frmPropertyTransfer] with record source from a table [tblPropertyManifest] with a continuous subform
[SubfrmPropertyTransfer] with a record source from a select query [qryPropertyTransfer]. The main form is a manifest for
items being shipped out where the Parent to Child relationship is:
frmPropertyTransfer – PropertyManifestID
SubfrmProeprtyTransfer – PropertyManifest_fk
On my subform, I have an After Update event:
Private Sub BagNum_AfterUpdate()
'Control Source = Nz(DLookup("Control Source", "my table", "[Control Source after update value] = _
''" & [Control Source after upate value] & "'"))
Me.DateIn = Nz(DLookup("DateIn", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.PropertyTypeID = Nz(DLookup("PropertyTypeID", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.DetentionID = Nz(DLookup("DetentionID", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.PropertyID = Nz(DLookup("PropertyID", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
I haven’t had luck with a previous post last month and attempting to explain the situation again.
Thank you in advance!