473,385 Members | 1,487 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Total on Hand Question

135 100+
I need some help with an inventory type question. To lay the foundation... I have an inventory database that keeps track of parts for rebuilds. The tables are: CATEGORIES which is linked to table PRODUCTS. The PRODUCTS table is the parts needed to rebuild the items in the CATEGORIES table. I have a form where I can pick a category that will open a new form showing all the parts (from table PRODUCTS) that relate to that category (from table CATEGORIES). I can then open an individual PRODUCT form to view the current state of that product relating to the specific CATEGORY. Ok, I hope that made sense. Pretty simple basic access stuff. My question is this: On my form for the individual products I have fields that show the total number of that particular product needed for rebuild as well as the total number of products actually on hand. How do I show how many sets of rebuilds I have left? Let's say it takes 5 items per rebuild and I have 7 on hand. How do I show that I have 1 rebuild on hand. Or how do I show I have, say, enough items for 3 rebuilds if I have 17 items? How do I show 1 rebuild per set of 5? I am currently trying to sum the total "on hand" and divide it by the rebuild amount. The problem with that is I get an answer like 2.5557. If I select "0" decimal places format it rounds up to 3. Kind of stumped.
Apr 12 '09 #1
3 1487
missinglinq
3,532 Expert 2GB
This is an easy one! When dividing use the backslash; it returns only the Integer part of the division!

17/5 = 3.4

but

17\5 = 3

Linq ;0)>
Apr 12 '09 #2
MyWaterloo
135 100+
.................(stunned silence)............... LOL I can't believe that was as easy as just a backslash. Thanks
Apr 12 '09 #3
missinglinq
3,532 Expert 2GB
The backslash is an operator a lot of people are unaware of. You could have also used Int() which returns the Integer portion of a number or expression that evaluates as a number.

Int(17/5) returns 3.

Linq ;0)>
Apr 12 '09 #4

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

Similar topics

4
by: James Greig | last post by:
hello people, i'm just learning javascript, could someone point me in the direction of an example of the following, or give me some clues as to how it might be done: what i would like to do...
2
by: msnews | last post by:
Hi All, We have a requirement to display total number of current users using the site. We want to display only the total no other information. And this value needs to change dynamically. Is it...
1
by: Marie | last post by:
How do you display a total from a subreport on the main report. If it makes a difference, the total is a total of a calculated field (Qty * Price). Does the total on the subreport go in the...
2
by: Jon | last post by:
I have a datagrid with a total row on the bottom. What is the best method to "instantly" update the total row when the value of any row changes. I am running into problems when I use the column...
16
by: ken | last post by:
I have a formA and subformB subformB is a continous form with a txtTotal in form footer =Sum() This works fine as long as there are records in form but if form is null I get Error I would like...
17
by: M.Siler | last post by:
I'm trying to get my head around a conversation I had with a developer the other day. We were talking about Codesmith vs. Hand coding. He's position is Codesmith is for junior to mid level...
5
by: alanb | last post by:
Hi, hope someone can help, I need to be able to keep a running total of radio buttons selected, as a user goes through a set of 16 questions, devided in to 4 catorgories, then on "submit" have the...
21
beacon
by: beacon | last post by:
Hello to everybody, I have a section on a form that has 10 questions, numbered 1-10, with 3 option buttons per question. Each of the option buttons have the same response (Yes, No, Don't know),...
6
by: plaguna | last post by:
I’m creating a Microsoft Access Report of 6 different questions with “Yes” and “No” answers. I have no problem to count the Yes and Nos with the following formulas for each question in the Report...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.