Solved

How make field update in a form

Posted on 2014-02-12
9
282 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 500 total points
ID: 39853751
so this should work now, did you test it on sample Test3.accdb ?
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

751 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