Update Query Problem

AdamHughes

New member
Local time
Today, 00:04
Joined
Feb 17, 2006
Messages
8
Hi,

I am trying to make a query that updates the amount of stock, by simply taking away the quantity of stock purchased from the total of stock in stock!

I did what I thought I was supposed to do, but it never works - I get a box asking me to set the parameter, even though I've already determined in my design view what I want it to be. All the query seems to do is change the quantity purchased to 0, but doesn't take anything away from the quantity in stock.

can anyone show me where I'm going wrong, or give me some pointers??

hereare two images, one that displays my design view of the query and one that shows what it asks me for everytime I run the query.

www.flashtheband.co.uk/images/whatswrong.jpg
www.flashtheband.co.uk/images/whatswrong2.jpg

Thanks in Advance,
Adam
 
Can't see the end of your subtraction there, but if it's "Quantity", then you've spelled it differently than it is in the table (where it's mispelled). By the way, most people would advise you not to store the quantity, but rather derive it from transactions as needed. Here's a good discussion on the topic:

http://allenbrowne.com/AppInventory.html
 
Aah, I'm kicking myself now, you won't believe how many times I looked over that query and constantly looked at spelling but judged it as fine... I'm silly

thanks for that article Paul, I'll give it a read and a go!

And thanks for noticing my idiotness!

Cheers!
Adam
 
Sometimes it just takes another pair of eyes. It seems like once your eye sees something the wrong way, no matter how many times you look at it again, your eye keeps seeing it wrong.
 

Users who are viewing this thread

Back
Top Bottom