Solved

How make field update in a form

Posted on 2014-02-12
9
278 Views
Last Modified: 2014-02-12
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
Comment
Question by:SteveL13
  • 5
  • 4
9 Comments
 
LVL 10

Expert Comment

by:Gozreh
ID: 39853732
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
 

Author Comment

by:SteveL13
ID: 39853742
Yes.  If the remaining qty is equal to 0 then the record should not show up.
0
 
LVL 10

Accepted Solution

by:
Gozreh earned 500 total points
ID: 39853751
so this should work now, did you test it on sample Test3.accdb ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:SteveL13
ID: 39853775
Yes.  You are correct.  Thank you again!
0
 
LVL 10

Expert Comment

by:Gozreh
ID: 39853782
i see now that you have a field ReadyQty and AvailableQty, do you want to update the AvailableQty after each shipment ?
0
 

Author Comment

by:SteveL13
ID: 39853800
Yes.
0
 
LVL 10

Expert Comment

by:Gozreh
ID: 39853821
you have their ReadyQty, DumpedQty, AvailableQty, InventoryQty
what is the purpose of this fields, and which one do you need to be updated ?
0
 
LVL 10

Expert Comment

by:Gozreh
ID: 39853831
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
 

Author Comment

by:SteveL13
ID: 39853923
Thanks again.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question