Chat with a LIVE Microsoft Access Expert!
 
       
 

         

   

Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
 
Chat with a LIVE Microsoft Access Expert!
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-04-2005, 01:39 PM
sevenair sevenair is offline
Registered User
 
Join Date: Apr 2005
Posts: 6
sevenair is on a distinguished road
Update Qry always updates to Zero

Hey,
im trrying to build a stock control system for a small store, and im having a nightmare trying to gert the updatestock query to work. It is an update query, and it does update this, the only thing is, no matter how many i sell on a day, it always sets the InStock to Zero.

Basically, I have a Sale table, which records the ProductID, and Quantity. I also have a Stock table, with an InStock value. I want to take a SumOfSale and then a this to he InStock value in the Stock table.

I couldnt make a query to automatically update stock as I make a sale, so i thought I could just take a tally of how many i sell a day (sumofsalequantity), and then deduct this from the InStock at the end of the day, but this isnt working Sad

Does anyone know why it would reset the InStock to zero, regarless of how many is in stock?? r can you avise me on where to get help, ive tried everything, been reading all the manuals, and im at my witts end now

Any advice would e much much appreciated Smile
Reply With Quote
Sponsored Links
  #2  
Old 04-04-2005, 02:06 PM
KenHigg KenHigg is offline
~~~~~~~~
 
Join Date: Jun 2004
Posts: 12,167
KenHigg has a spectacular aura aboutKenHigg has a spectacular aura about
I think you'll find that the consensus at this forum is to not store the value at all, but rather do totals every time you need to know the value. So an explaination as to a fix for the way you're trying do it would get heckled and scorned

Ken
Reply With Quote
  #3  
Old 04-05-2005, 02:27 AM
Jon K Jon K is offline
Registered User
 
Join Date: May 2002
Posts: 2,209
Jon K will become famous soon enough
Take a look at this thread. It illustrates how you can use a function to find the current stock (and the stock at a particular date) of a ProductID.
http://www.access-programmers.co.uk/...ad.php?t=82677


New link to Allen Browne's page:
http://allenbrowne.com/AppInventory.html
.
__________________
Access 2003, WinXP

Last edited by Jon K; 04-05-2005 at 04:16 AM..
Reply With Quote
  #4  
Old 04-05-2005, 05:13 AM
sevenair sevenair is offline
Registered User
 
Join Date: Apr 2005
Posts: 6
sevenair is on a distinguished road
hey, thanks very much :-) il give it a try :-)
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:21 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) copyright 2009 Access World