?
Solved

How make field update in a form

Posted on 2014-02-12
9
Medium Priority
?
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 total points
ID: 39853751
so this should work now, did you test it on sample Test3.accdb ?
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 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