473,385 Members | 1,256 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.

Access Query - Calc while item code is the same

My table has item code, item sequence, and then item minimum, base and rate. I want write a query to calc the item charge while the item code is the same. Each item code could have more than one sequence (or tier).

Expand|Select|Wrap|Line Numbers
  1. ItemNumber ItemSeq ItemUnit ItemMin ItemBase  Item Rate
  2. F00011       01       10    $75.00   $18.00    $3.30
  3. F00011       02       15     $0.00    $0.00    $2.20
  4. F00011       03      999     $0.00    $0.00    $1.10
  5. F00014       00        1     $0.00   $18.00    $0.00
I'm thinking it should be some kind of "for each" or "do while" statement, but I can't figure it out.
Nov 16 '10 #1
1 1208
NeoPa
32,556 Expert Mod 16PB
I presume [Item Code] and [Item Number] are the same thing, though why on earth you would post it the way you have is completely beyond me. Saving yourself time while upsetting hundreds of people who are just trying to help you seems a strange way to start a question.

Your question is about how you would calculate the [Item Charge] in a query. As you also give no explanation of what calculation should be used (although the values available for use are well detailed - good work on that - Actually, that's why I didn't simply delete the question), I can't see any way I can answer this now.

Why don't you provide the required details for the question and we'll do what we can for you.
Nov 17 '10 #2

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

Similar topics

2
by: Puneet Murgai | last post by:
I am trying to run an access query which works when I write it directly in the database. However, it fails when an SQL script containing it is run from C++. It doesn't recognize the Iff and Nz...
0
by: Sinead ORiordan | last post by:
I am running a vb6 application which accesses an SQL server database and an Access database. I have a table in the access db which is populated every time i run the vb app. However, when i run...
1
by: Suzi Carr | last post by:
Hello, We create querydefs in VB programs (i.e. CreateQueryDef). But as illustrated below, Access regenerates the SQL code we specify -- particularly the WHERE clause. While the new code is...
5
by: Art | last post by:
Hi, Can anyone point me to an example of how I would execute a query I've created in an Access DB. I've copied the SQL down to my VB.net application and that works fine, but it's ugly. I'd like...
8
by: s_wadhwa | last post by:
SELECT DISTINCTROW "01C" AS dummy, Buildings.BuildingNumber, UCASE(Buildings.BuildingName) AS BuildingName, Buildings.MasterPlanCode, Buildings.UniformBuildingCode,...
9
by: sajuk | last post by:
Hi, any ideas for this problem would be appreciated. - I am coding to enable me to use a receipt printer as the Access Report functionality does not give the correct working function. - I have...
2
by: k-man | last post by:
Hi: I have an MS Access query for a table called MyTable. One of my fields in the query is a custom field that looks like "MyField: = MyFunction(ID)" where ID is a field in MyTable. I have...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
17
by: chadh | last post by:
Hello, I'm having some troubles exporting a query to a csv file. I am able to use the doCMD.TransferText to output the query to the csv file, however, I cannot get it to use the Export...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.