473,321 Members | 1,708 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,321 software developers and data experts.

Syntax for the table to get the bin code and qty

Hi,
i have a table like this

item bincode qty
4000009 36 96
4000010 33 48
4000009 146 24
4000009 140 24
4000010 140 24
4000010 140 12
4000010 33 -48
4000010 37 48
4000008 36 -96
4000009 34 96
4000010 37 -12
4000009 34 -24
4000010 37 -12
4000010 37 -24
4000007 34 -48
4000010 140 -12
4000010 143 12
4000010 140 -12
4000010 143 12
4000010 143 -24
4000009 31 -24
4000009 146 -24
4000009 140 -12
i want a result that if type an item no., it should show all the bincodes matching to the item no. With the sum total of he qty. Anbody can suggest syntax to use in access or excel for this. How the result look like is mentioned in the picture
Attached Images
File Type: jpg BIN CONTENTS RASH.xlsx - Excel.jpg (12.9 KB, 87 views)
File Type: jpg BIN CONTENTS RASH.xlsx - Excel_2.jpg (28.8 KB, 175 views)
Apr 19 '16 #1
3 2393
Seth Schrock
2,965 Expert 2GB
The solution would be completely different for Access versus Excel, so you will need to choose which one you want to use. If you are using Excel, then I would use the SumIf formula. In Access, you would create a query with the proper criteria and use the Sum() function to add up your quantity. If you want more detail, then you are going to need to make your choice of which system you are going to use.
Apr 19 '16 #2
Thank u for ur reply... I will use access
Apr 19 '16 #3
Seth Schrock
2,965 Expert 2GB
The way that I would do it would be to build a form with a textbox on it that has a textbox for your item number. Lets say that you named the form frmSearch and the textbox txtItemNo. Your would then need to build a query like the following:
Expand|Select|Wrap|Line Numbers
  1. SELECT bincode, qty
  2. FROM your_table_name
  3. WHERE item = Forms!frmSearch!txtItemNo
To get the total of qty, then run your query and then on the Home tab of the Ribbon Bar, in the Records group, click Totals. It will add a row at the bottom of your query. If you click in the empty cell under the qty column, you will see that you have a drop down box. Select Sum and then it will add up the qty column. Now save your query. If you want, you can add a button to your form that opens the query.
Apr 20 '16 #4

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

Similar topics

7
by: John Hunter | last post by:
Are there any tools that can be used to process python code and generate LaTeX/TeX output with syntax highlighted code? John Hunter
3
by: foldface | last post by:
Hi This works but is a bit long-winded. Is there a better way? ta F <style> ..Header { background-color: gray;
0
by: Tom Young | last post by:
CCIDE reads your C program source and expands decision tables with supporting C code. See http://sourceforge.net/projects/ccide for downloads and more. See the CCIDE Home Page at...
1
by: Benny Raymond | last post by:
I have a dataset setup with a main table that has some information in it along with an element that is a nested table so that I can store rows of history information for that one row in the main...
3
by: BLiTZWiNG | last post by:
I am currently creating a compile on demand asp.net application because I need to query a database and return only an xml string using Response.Write, but visual studio wont colour or give me...
5
by: Michael C via AccessMonster.com | last post by:
Hello, I have a table that I am appending 3 seperate tables into. My main problem is that each time I append the data, it simply adds to the data already there. That might sound ok, except that...
1
by: dean.brunne | last post by:
Hi, In the code below I scroll throught the firldnames of a query ignoring the first three then converting the remaining fields to first: the fieldnames as a record in a field called Product...
6
by: jph | last post by:
Hey, can anyone give newbie a tip on how to call function to get value to CommandField's edittext property. <%="test"%> is not working or '<%="test"%>' and so on..
0
by: agiler | last post by:
help,a regular text file how to sql 2000 table code ? i have a text file as follow, line with ¡°|¡±and {LF}, 8|-000000186075919.|+000000000387820.|2008-03-31|20010423|...
5
by: deenar | last post by:
Hi Guys, I'm getting an error msg of 'declaration syntax error' NEED HELP!!! #include<stdio.h> #include<ctype.h> void PrintMenu() { printf("a) My Name \n"); printf("b) Tutorial day and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.