473,805 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Total on Hand Question

135 New Member
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 1512
missinglinq
3,532 Recognized Expert Specialist
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 New Member
............... ..(stunned silence)....... ........ LOL I can't believe that was as easy as just a backslash. Thanks
Apr 12 '09 #3
missinglinq
3,532 Recognized Expert Specialist
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
11830
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 is make a self totalling version of this page > http://www.ayrshirehousing.org.uk/applications/applications.html so that basically as a person checked or unchecked boxes, a
2
2415
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 possible to do this? Please let me know how to do it. Thanks.
1
4910
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 pagefooter or report footer? Say the total is shown in a texrbox named MyTotal and the subreport control is named MySubreportControl, what exactly do I put in the control source of a textbox on the main report to show the total? Thanks For All Help! ...
2
5342
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 changed event to calculate the total and assign it directly to the grid -> myDataGridObject=newTotal. When I do this, more change events are fired, causing unwanted consequences.
16
2466
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 to get arround this as I Have a label to be Visible only if txtTotal>= 45000
17
1672
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 developer who perfer "wizards" to write code for them. That these types of code generators produce substandard developers who don't have real skills. I don't have a position one way or the other until I have a bit more information, but if I was to take...
5
3680
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 total number showen on screen, or on "submit" loop through the selected radio buttons and get the total. What I have at the moment will loop through all the buttons and just add all the totals, how do I get this code to add together the...
21
17463
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), but each answer is given a different point value for each question. For instance, question 1 might ask "Do you like candy?" and if you answer Yes you will get +1, No will earn you -1, and Don't know will net you zero points. The next question might...
6
5935
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 Footer: =Count(IIf(=”YES”,0)) =Count(IIf(=”NO”,0)) My question is: how can I get a percentage of NOs for each question? I tried to create a new field (Total of Yes) and (Total of No) in my query with the above formulas, that way I can manipulate...
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10107
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.