G
Guest
I have a form where I'm using the DSUM function within a lost focus event.
For some reason it doesn't update immediately when I leave the field.
Sometimes I actually have to hit the arrow twice to move to the next record.
I will give the details of the code involved here, any help would be greatly
appreciated...
Private Sub TxtLotNumber_Change()
[TxtOriginalQty] = DLookup("[OriginalQty]", "[API_LOT]", "[LotNumber] =
Forms![Enter API Sublots]![TxtLotNumber]")
[TxtOriginalUnits] = DLookup("[Units]", "[API_LOT]", "[LotNumber] =
Forms![Enter API Sublots]![TxtLotNumber]")
End Sub
Private Sub TxtQtyDispersed_LostFocus()
TxtQtyOnHand = [TxtOriginalQty] - DSum("[QtyDispersed]", "API_SUBLOT",
"[TxtLotNumber]=[LotNumber]")
TxtQtyOnHand.Requery
End Sub
I hope this is enough information to go on...
Thanks!
For some reason it doesn't update immediately when I leave the field.
Sometimes I actually have to hit the arrow twice to move to the next record.
I will give the details of the code involved here, any help would be greatly
appreciated...
Private Sub TxtLotNumber_Change()
[TxtOriginalQty] = DLookup("[OriginalQty]", "[API_LOT]", "[LotNumber] =
Forms![Enter API Sublots]![TxtLotNumber]")
[TxtOriginalUnits] = DLookup("[Units]", "[API_LOT]", "[LotNumber] =
Forms![Enter API Sublots]![TxtLotNumber]")
End Sub
Private Sub TxtQtyDispersed_LostFocus()
TxtQtyOnHand = [TxtOriginalQty] - DSum("[QtyDispersed]", "API_SUBLOT",
"[TxtLotNumber]=[LotNumber]")
TxtQtyOnHand.Requery
End Sub
I hope this is enough information to go on...
Thanks!