473,796 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing Items On An Order And Auptmatically Updating Inventory

Tom
Using AccessXP - Access2000

In my application, when an order is entered, inventory is automatically
adjusted, a pull list is created, items are pulled to fill the order, and the
order is packaged for shippment. The order is then held pending payment and
finally shipped when payment is received. Sometimes prior to shipment the
customer calls and wants to change one or more items, wants to change the
quantity of one or more items or wants to add one or more new items to the
order. I have an order/order details form/subform for entering the changes. I
need some help on how to automatically adjust inventory for the changes.

A. Change one or more items ---
(a) The quantity for the existing item must be added back to inventory. I
presume this would be done in the AfterUpdate event of the item. When I change
the item, I now know what the new item is and what the quantity was for the old
item. How do I know what the old item was after I change the item so I can add
the quantity of the old item back to inventory?
(b) The quantity of the new item must be subtracted from inventory. I presume
this would be done in the AfterUpdate event of Quantity. The item has been
changed so I know what the new item is. The quantity has been changed so I know
the quantity of the new item. So I just subtract the new quantity from
inventory - seems straight forward ????

B. change the quantity of one or more items -----
If the new quantity is more than the old quantity, the difference must be
subtracted from inventory and
if the new quantity is less than the old quantity, the difference must be added
back to inventory. I presume this would be done in the AfterUpdate event of
Quantity. How do I know what the old quantity was after I change the quantity so
I can determine if the new quantity is more or less than the old quantity and
then be able to add back to or subtract from inventory?

C. add one or more new items to the order ---
(a) When I add a new item, how do I determine that the item is a new item and
not an existing item that is being changed where A. above would apply?
(b) When the quantity for the new item is entered, how do I determine that the
quantity is for a new item and not an existing item that is being changed where
B. above would apply?

I will appreciate all the detail anyone can give me!

Tom
Nov 12 '05 #1
0 2221

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2437
by: Maria L | last post by:
I have a client who needs to copy an existing sale. The problem is the Sale is made up of three tables: Sale, SaleEquipment, SaleParts. Each sale can have multiple pieces of equipment with corresponding parts, or parts without equipment. My problem in copying is when I go to copy the parts, how do I get the NEW sale equipment ids updated correctly on their corresponding parts? I can provide more information if necessary. Thank you!!
3
3938
by: G-Fit | last post by:
Hello group, I have several servers hosting SQL databases. On each of them, I have several databases. All those databases have the same structure (even those on different servers), only the data changes. I made a winforms application that allows me to manage those databases easily, and used several SqlDataAdapter to achieve this, all of them filling the same Dataset which has relations, and this Dataset being the DataSource of a...
1
3441
by: MickG | last post by:
I am trying to change the value of the variable "hard" according to which radio button is pressed and I am having no joy. Could anyone help me with this, the problematic section is marked with ***********************, I've included all the code incase that isn't where the problem is. Any help would be hugely appreciated. Mick
5
19659
by: Dee | last post by:
I'm trying to change a field value on a subform called Inventory whenever a field on the main form is updated. I can't get it to work. Could someone correct my line of code? Private Sub Ctl5inBoxKDeliv_rd_AfterUpdate() Me!Inventory.Form.K5inBoxK = 99 End Sub
6
7215
by: segue | last post by:
Hi; I need to change the order of a listbox array from a form app where I select order up or down. What's a good way to do that? Regards; Segue
4
15082
by: Wally | last post by:
This is probably a very simple problem, but I can't figure out the coding for it. I have a list box that displays one of my tables. I'd the user to be able to reorder the items in the list box as they please. I've created an up and down button but I can't figure out the coding for me to do so. Can anybody help me out with this? Thanks Wally
3
3060
by: jmDesktop | last post by:
Hi, probably a simple question that I have for what I think is a simple database. I have a Vendors table and an Items table. There is only one items, but several Vendors may have that same item. I have to have a third table, correct, to connect them? I was thinking OrderDetails (or something like that) OrderDetailID
18
2956
by: Hunk | last post by:
Would like some advice on the fillowing I have a sorted list of items on which i require to search and retrieve the said item and also modify an item based on its identity. I think an Map stl container would be most suited. Am i correct in my assumptions Problem Reocrds are already stored with a unique identity in a binary format.The structure is roughly ----------------------
1
1932
by: CriminalTruth | last post by:
Hi i created an access 2003 dmb that tracts inventory by a production number. Now i need a way to decrease the inventory as it gets removed from inventory which a clerk would input. i know the basics of how it would be done but im not sure how to call the sql function i would need to write.... or even how to write the sql function. Here was my idea and maybe you can help? they would input the production number? they would input a...
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10455
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10173
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10006
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7547
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.