By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,199 Members | 1,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,199 IT Pros & Developers. It's quick & easy.

Access Formula Question

P: 1
I am attempting to build an inventory program for personal use and training. I would like to add a formula to a query that is pulling my table data with which I will populate a form.
I need to automatically calculate number of items needed by subtracting number of items desired from number of items onhand. The user will enter the desired and onhand amounts.
I have created a table with these three fields included, and have created a query that includes all three fields, and seems like I should be able to enter the expression "Invent_Desired - Invent_Onhand" and store the value in the Invent_Needed but it doesn't work! Im very frustrated!
I hope you can help... look forward to your reply.
VR/
Tony
Nov 21 '07 #1
Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,666
I am attempting to build an inventory program for personal use and training. I would like to add a formula to a query that is pulling my table data with which I will populate a form.
I need to automatically calculate number of items needed by subtracting number of items desired from number of items onhand. The user will enter the desired and onhand amounts.
I have created a table with these three fields included, and have created a query that includes all three fields, and seems like I should be able to enter the expression "Invent_Desired - Invent_Onhand" and store the value in the Invent_Needed but it doesn't work! Im very frustrated!
I hope you can help... look forward to your reply.
VR/
Tony
There are several Methods which you can use to accomplish this, one of which is an Update Query which will calculate the Invent_Needed values and store them in this Field. Assuming your Table Name is tblInventory:
Expand|Select|Wrap|Line Numbers
  1. UPDATE tblInventory SET tblInventory.Invent_Needed = [Invent_Desired]-[Invent_Onhand];
Nov 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.