• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

How make field update in a form

Am expert helped me with the previous solution but now I need the available qty to update after each previous record has been entered.

Please see attachment
Test3.accdb
0
SteveL13
Asked:
SteveL13
  • 5
  • 4
1 Solution
 
GozrehCommented:
When you click "New Shipment" you will only see "Cat A", because "Cat B" remaining qty is 0 , but you can still see "Cat B" in the previous shipments.
Is this what you needed ?

as i wrote before
I added to your Query1 a sum of all ShipQty and filtered by not 0, and also should be filtered with the shipmentID so that you will be able to see the previous shipments.
0
 
SteveL13Author Commented:
Yes.  If the remaining qty is equal to 0 then the record should not show up.
0
 
GozrehCommented:
so this should work now, did you test it on sample Test3.accdb ?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
SteveL13Author Commented:
Yes.  You are correct.  Thank you again!
0
 
GozrehCommented:
i see now that you have a field ReadyQty and AvailableQty, do you want to update the AvailableQty after each shipment ?
0
 
SteveL13Author Commented:
Yes.
0
 
GozrehCommented:
you have their ReadyQty, DumpedQty, AvailableQty, InventoryQty
what is the purpose of this fields, and which one do you need to be updated ?
0
 
GozrehCommented:
If you want to update the DumpedQty field with total qty you already shipped, then you can add code in subfrmShipmentNEW
Private Sub Form_AfterUpdate()
   CurrentDb.Execute "UPDATE tblReady SET tblReady.DumpedQty = Nz(DSum(""ShipQty"",""tblShipmentDetails"",""ShipmentReadyID=" & Me.ReadyID & """),0);"
End Sub

Open in new window

0
 
SteveL13Author Commented:
Thanks again.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now