Solved

How make field update in a form

Posted on 2014-02-12
9
270 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
Comment Utility
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
Comment Utility
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
Comment Utility
so this should work now, did you test it on sample Test3.accdb ?
0
 

Author Comment

by:SteveL13
Comment Utility
Yes.  You are correct.  Thank you again!
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 10

Expert Comment

by:Gozreh
Comment Utility
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
Comment Utility
Yes.
0
 
LVL 10

Expert Comment

by:Gozreh
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks again.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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 Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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 …

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now