Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Trouble with three firlds
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hubbymax  
View profile  
 More options Nov 6, 10:41 am
Newsgroups: microsoft.public.access
From: Hubbymax <jaredal...@hotmail.com>
Date: Thu, 5 Nov 2009 15:41:11 -0800 (PST)
Local: Fri, Nov 6 2009 10:41 am
Subject: Trouble with three firlds
I have receivables form that has 3 fields I am having trouble with.

UnitsInStock
AddUnits
TotalUnits

UnitsInStock is drawn from a Products table, AddUnits is put in by
the
user, TotalUnits is a sum of the first two fields. I would like to
have the UnitsInStock updated by the TotalUnits field once the sum
for
the TotalUnits is done and the AddUnits field returned to "0".


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Al Campagna  
View profile  
 More options Nov 6, 12:00 pm
Newsgroups: microsoft.public.access
From: "Al Campagna" <newsgro...@comcast.net>
Date: Thu, 5 Nov 2009 20:00:11 -0500
Local: Fri, Nov 6 2009 12:00 pm
Subject: Re: Trouble with three firlds
Hubbymax,
    Think of a parts inventory as a checkbook.
    Money comes in and money goees out.
    Your inventory table should be like a checkbook... able to handle both
Credits and Debits...
PartNo        Rcvd      Disb
1234-11         3           0
17265-4         6           0
1234-11         0           2
1234-11         4           0
4153-33       10           0
1234-11         3           0

The current inventory count of P/N 1234-11 = DSum of Rcvd - DSum of Disb
(10 - 2 = 8)
--
    hth
    Al Campagna
    Microsoft Access MVP
    http://home.comcast.net/~cccsolutions/index.html

    "Find a job that you love... and you'll never work a day in your life."

"Hubbymax" <jaredal...@hotmail.com> wrote in message

news:869f6e11-ddc4-4947-af4b-770fdf3b8c37@f18g2000prf.googlegroups.com...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
George  
View profile  
 More options Nov 6, 12:09 pm
Newsgroups: microsoft.public.access
From: "George" <george_hepwo...@hotmail.com>
Date: Thu, 5 Nov 2009 17:09:47 -0800
Local: Fri, Nov 6 2009 12:09 pm
Subject: Re: Trouble with three firlds
There is a better way. What you are doing is storing a calculated field,
which is generally considered a bad design in any table. You should not be
risking loss of integrity in your data by calculating and recalculting
amounts.

Inventory management can be one of the more complex applications to manage,
but the essential issue here is that you need only Two inventory adjustment
fields, not three. Those fields are "AddUnits" and "AddReason", or more
probably a different set of field names better suited to the requirement,
such as "Adjustment" and "AdjustmentReason". That allows you to track both
positive changes (Inventory received from vendors) and negative changes
(shrinkage).

When units are added to, or subtracted from stock, you insert a record into
AddUnits and an ID to indicate the reason for the adjustment. The SUM of all
such additions is your UnitsInStock before adjustments for sales,
adjustments, etc. Sales records are added, I assume, in a separate sales
transaction table, and the same process can be applied to it.

The basic query to return that would be:

"Select Product, SUM(Adjustment) AS TotalAdjustments FROM tblInventory
GROUP BY Product"

To account for sales, of course, you need something similar:

"Select Product, SUM(QuantitySold) AS TotalSales FROM tblSaleDetails
GROUP BY Product"

To get your current Units in Stock, you combine the two, subtracting total
sales from total adjustments:

Select Product, SUM(tblInventory.Adjustment) -
SUM(tblSaleDetail.QuantitySold) as UnitsInStock
FROM tblInventory LEFT JOIN tblSaleDetails ON tblInventory.ProductID =
tblSaleDetail.ProductID
GROUP BY Product

Whereever you need the current Units in Stock amount, you get it from this
query.

I am aware that there are other approaches to inventory tracking, and that
the exact implementation depends to a certain extent on how your business
operates. Nonetheless, this is the basic approach you need to take.

George

"Hubbymax" <jaredal...@hotmail.com> wrote in message

news:869f6e11-ddc4-4947-af4b-770fdf3b8c37@f18g2000prf.googlegroups.com...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hubbymax  
View profile  
 More options Nov 7, 8:22 am
Newsgroups: microsoft.public.access
From: Hubbymax <jaredal...@hotmail.com>
Date: Fri, 6 Nov 2009 13:22:35 -0800 (PST)
Local: Sat, Nov 7 2009 8:22 am
Subject: Re: Trouble with three firlds
On Nov 5, 5:09 pm, "George" <george_hepwo...@hotmail.com> wrote:

The more I get into this the more I find myself way beyond my current
abilities. My program is for internal transactions within a company.
Shipping and Receiving is the only "purchaser" from outside recourses
and there are numerous divisions that "purchase" from Shipping and
Receiving. The only info entered from the outside recourses is the
amount received of a product and it's cost. All I wanted to do was
have the TotalUnits field update the UnitsInStock. I was hoping an
"After Update", "on Click", "On Exit" or some other command that would
take place after the calculation of the TotalUnits field would do the
trick. If this query code is the only way to go I will give it a try.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rudolf Lamour  
View profile  
 More options Nov 8, 5:40 am
Newsgroups: microsoft.public.access
From: "Rudolf Lamour" <rudolflam...@freenet.de>
Date: Sat, 7 Nov 2009 19:40:15 +0100
Local: Sun, Nov 8 2009 5:40 am
Subject: Re: Trouble with three firlds

"Hubbymax" <jaredal...@hotmail.com> schrieb im Newsbeitrag
news:869f6e11-ddc4-4947-af4b-770fdf3b8c37@f18g2000prf.googlegroups.com...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rudolf Lamour  
View profile  
 More options Nov 8, 5:40 am
Newsgroups: microsoft.public.access
From: "Rudolf Lamour" <rudolflam...@freenet.de>
Date: Sat, 7 Nov 2009 19:40:10 +0100
Local: Sun, Nov 8 2009 5:40 am
Subject: Re: Trouble with three firlds

"Hubbymax" <jaredal...@hotmail.com> schrieb im Newsbeitrag
news:869f6e11-ddc4-4947-af4b-770fdf3b8c37@f18g2000prf.googlegroups.com...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rudolf Lamour  
View profile  
 More options Nov 8, 5:51 am
Newsgroups: microsoft.public.access
From: "Rudolf Lamour" <rudolflam...@freenet.de>
Date: Sat, 7 Nov 2009 19:51:16 +0100
Local: Sun, Nov 8 2009 5:51 am
Subject: Re: Trouble with three firlds

"Hubbymax" <jaredal...@hotmail.com> schrieb im Newsbeitrag
news:869f6e11-ddc4-4947-af4b-770fdf3b8c37@f18g2000prf.googlegroups.com...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Al Campagna  
View profile  
 More options Nov 10, 6:41 am
Newsgroups: microsoft.public.access
From: "Al Campagna" <newsgro...@comcast.net>
Date: Mon, 9 Nov 2009 14:41:32 -0500
Local: Tues, Nov 10 2009 6:41 am
Subject: Re: Trouble with three firlds
Hubbymax,
    Whenever you deal with an inventory system, the first thing is
to get the tables right.
    One table named tblInventory can contain the fields necessary to
handle both receiving to inventory as well as disbursing from inventory.
    Your checkbook is a good example of an "inventory" table... each line
entry
can be a Credit or a Debit.
Ex...
  Key
 PartNo    Desc      Price    Rcvd   Disb
152X-1   Flange    1.33        10
17RD-9   Bar          .74         5
152X-1   Flange    1.33                  7

Are you up to that point with your table design?
--
    hth
    Al Campagna
    Microsoft Access MVP
    http://home.comcast.net/~cccsolutions/index.html

    "Find a job that you love... and you'll never work a day in your life."

Hubbymax" <jaredal...@hotmail.com> wrote in message

news:6688eb67-6303-40a4-941f-5a54e9aa1e98@w37g2000prg.googlegroups.com...
On Nov 5, 5:09 pm, "George" <george_hepwo...@hotmail.com> wrote:

The more I get into this the more I find myself way beyond my current
abilities. My program is for internal transactions within a company.
Shipping and Receiving is the only "purchaser" from outside recourses
and there are numerous divisions that "purchase" from Shipping and
Receiving. The only info entered from the outside recourses is the
amount received of a product and it's cost. All I wanted to do was
have the TotalUnits field update the UnitsInStock. I was hoping an
"After Update", "on Click", "On Exit" or some other command that would
take place after the calculation of the TotalUnits field would do the
trick. If this query code is the only way to go I will give it a try.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google