Count And Multiply

Jun 15, 2006

Does anyone know how to count a field and multiply the answer automaticaly.. so if i have a count function on number of names repeated in a table via nameID the result would be presented in the new query with how many times name repeated multiplyed by a defualt set number.instead of name repleated 3 times, it be 30 times..using a query. any help appreciated..thanks

View Replies


ADVERTISEMENT

Multiply Fields

May 21, 2005

How to multiply a group of records in an Table (eg. I have a table with tow fields Id and Value, how to multiply all Value records)

View 1 Replies View Related

Multiply Queries

Sep 5, 2005

I am try to do all in one queries which has two queries imbedded into.

"SELECT Filter_ID, Channel, SpeedBands, Filter_Channel, Filter_type
FROM
(SELECT [Tbl_Lookup_Channels].[ID] AS Channel, [Tbl_Lookup_SpeedBand].[ID] AS SpeedBand
FROM Tbl_Lookup_Channels, Tbl_Lookup_SpeedBand)
LEFT JOIN
(SELECT [Site_ID] AS Filter_ID, [Channel] AS Filter_Channel, [Type] AS Filter_SpeedBand
FROM Tbl_SiteResults
WHERE Site_ID=" & ID &")
ON ((SpeedBand = Filter_Speedband) AND (Channel = Filter_Channel))
GROUP BY Filter_ID, Channel, SpeedBands, Filter_Channel, Filter_type
HAVING Filter_Channel Is Null AND Filter_type Is Null
ORDER BY Channel, SpeedBands;"

If is not work at all it is just asking that it is invalid join to the main query

Thanks

Sean

View 2 Replies View Related

Multiply Parameter Queries!

Apr 13, 2007

i have a Query where i have Criteria for two fields as the following:

Field :Date of Incident
Crirteria: [Forms]![frmSearchStudent&Date]![cboStartDate] And [Forms]![frmSearchStudent&Date]![cboEndDate]

Field: StudentSurname
Criteria: [Forms]![frmSearchStudent&Date]![Combo0]

Occasionally, staff may just want all incidents (records) to be shown for the selected StudentSurname and so, just select the surname and leave the date fields blank.

i tried the following:
Field :Date of Incident
Crirteria: [Forms]![frmSearchStudent&Date]![cboStartDate] And [Forms]![frmSearchStudent&Date]![cboEndDate]
Or: [Forms]![frmSearchStudent&Date]![cboStartDate] Is Null And [Forms]![frmSearchStudent&Date]![cboEndDate] Is Null

Field: StudentSurname
Criteria: [Forms]![frmSearchStudent&Date]![Combo0]

then when i tested this by leaving the date fields blank and selecting a valid student surname it simply returned all incidents (records) for ALL students not the selected one.

is it possible to achieve this? if so, could someone please help!

View 6 Replies View Related

Multiply Fields, Using The Sum Function.

Mar 17, 2008

Hi all, wondering if anyone can help me.

Im trying to a run a query to see the results of my table. but i am experincing problems, when use the SUM function.

I have constructed a query with three fields.
1) QTY.
2) Cost
3) Total.

what i would like is to be able to Multiply QTY & Cost to get the total.

so whan QTY Is 0 and Cost is £0.00. the query recongises it and changes the total should then be £0.00.

any advice on enabling the query is welcome.

View 12 Replies View Related

How To Multiply Values In A Form

Mar 22, 2005

Hi. I'm new to Access and I wonder if someone could help me with this problem I am having while constructing a database. We need to create a database of reservations to a program we offer. We will need to store the quantity of reservations per person. What we needed to do is multiply the quantity of reservations by the value of each reservation and get a 3rd field with the final amount. So we need a field with the result of the multiplication of the quantity of reservations by the value of each reservation, which is a fixed amount. I'm having problems getting access to do this, I get an "error" message on the resulting field. Can somebody help me with this?

Thanks.

View 3 Replies View Related

Multiply A Currency Field With Code

Apr 27, 2005

Currently i have:

If CIS = False Then
CIS_Payment = "£0.00"
Else
CIS_Payment = "£20.00"
End If

which works ok but what i want to do but do not know the correct way/syntax is:

If CIS = False Then
CIS_Payment = "£0.00"
Else
CIS_Payment = "Labour_Total*18/100"
End If

Where CIS_Payment and Labour_Total are currency fields, and CIS is a checkbox updated using an update query with the same info as detailed in another table (Couldnt get the conditions to work referencing the checkbox in the other table, so duplicated the box in both tables and used a query to sync)

Any ideas???

View 2 Replies View Related

Queries :: Multiply Time By Quantity

Apr 27, 2015

I have the time per item, and I would like to multiply that by the quantity, so I can tell the total time. But I cant find in access how to * data/time by a number.

View 3 Replies View Related

Forms :: Multiply A Text Box Value By A Number

Sep 10, 2013

I have a text box in a form that is producing a number from the query that the form is based on.In another Text Box i want to show the Value of the first Text Box multiplied by 3 because i am going to hide the first text box to only show the calculated number.

At the moment i have this in the control source of the text box [CountOfJobID]*3 but all i am getting is #####...I have set the format of the text box to General Number.

View 5 Replies View Related

Split Form Input Into Multiply Rows

May 14, 2007

Hi, I have a problem, I want to split up form input into several rows but I don't know how. Alright here's the deal: I have a textbox in a form were I write down all the ipaddresses for one computer and all the addresses end up in the same row in the same field in the table, I want the addresses to end up in different rows but in the same field, how do I do?

I might also add that i'm pretty new to access.

View 2 Replies View Related

Forms :: Unable To Multiply Values Of Two Number Fields Together

Aug 8, 2015

I'm trying to multiply the values of two number fields together, but it is not working. I used to be able to do this easily in earlier versions of Access. Here's the problem:

On the form, I need field A x field B to appear in field C. I've tried this as an expression in the build event function on the control, but it is not working. My code reads as follows: = (field A) * (field B).

View 3 Replies View Related

Tables :: Multiply Data Of Two Columns And Display Result In Third Column

Jun 24, 2014

My question is that can we do multiplication of data of two columns and result is automatically displayed in third columns in datasheet view.? Is it possible ?

View 1 Replies View Related

General :: Multiply Different Amount Of Hours By Different Amount Of Rates

Jul 17, 2014

I am trying to make a report in which I can see the amount of money that I have to pay weekly to an employee. To explain myself clearer, I have different rates for each employee. For example:

NameNormalPayRateVacationPayRateSickPayRateOvertimePayRateStandbyPayRate
John Smith$15$10$15$30$8
Ken Jonson$10$8$10$20$8

I am doing this in a query. So what I want to be able to do is, for example, take 4 hours that the employee worked at NormalPayRate and multiply it. But if tomorrow the employee worked at a different rate, for example 3 hours overtime, I want those 3 hours multiplied by OvertimePayRate.

The way I saw it on my Google researches, is that they have only one rate and the amount will be [SumOfHours]*[Rate]. But how can I tell my query to skip, for example, one rate because the employee didn't work at that rate that day. So I can have different amount for the different rates.

By the way, entering the information I can divide at what rate the employee worked x day. So if the employee work 6 hours at regular, and later on 4 hours at standby, I have those information separated in my table.

Results that I am getting: I can easily get the amount in money multiplying the whole hours by a rate, so my result in my report will be multiplied by the same rate.

I am using Access 2013 ...

View 2 Replies View Related

Count Records Problem. Display Field Even When Count Is Zero.

Apr 13, 2006

I have a table tblBookings.

In this table it has a bookingID, CustomerID and some other none relevant details.

The CustomerID comes from table tblCustomer. i.e a customerID must exist in the customer table to be allowed in the bookings table tblBookings

A customer can exist in tblCustomer without existing in the booking table.

I am trying to write a query that will list each and every customer ID in the tblCustomer and count the number of bookings that that customer has (even if it is zero).

I have a query that will count the bookings if they exist in the booking table and display the number of times that a customer appears in the bookings table.

SELECT tblBookings.CustomerID, Count(tblBookings.CustomerID) AS NoOfBookings
FROM tblBookings
GROUP BY tblBookings.CustomerID;


How do I create a query that will do this but list all customers even if they don't exist in the bookings table (but obviously occur in the customers table)

I am trying to create a similar query where all bookings per hotel are listed even if no bookings are made for that hotel. I am guessing the answer is the same as above.

The Ritz. Bookings 0
The Hilton. Bookings 3
The Carlton. Bookings 0
The Lowry. Bookings 2

For every hotel.

That kind of thing.

If you need more information please shout.

View 3 Replies View Related

Queries :: Using Count And MIN Together To Retrieve Only MIN Record With Count

Aug 16, 2015

I have a table that has 5M+ accounting line entries. Below is an example of one accounting journal in the table.

BUSN_UNIT_IJRNL_DJRNL_ICNCY_CMONY_A
CB0014/07/20140002888269323AUD16797
CB0014/07/20140002888269323AUD-16797
CB0017/07/20140002888269323AUD16797
CB0017/07/20140002888269323AUD-16797

The journal ID above was an accounting entry, debit $16,797 and credit $-16,797. because it was entered as a reversing journal in the system, the table has captured the Journal ID with 2 dates. For my purpose i only want the one date (MIN) date, the total amount of the journal (either the debit or credit amount 16,797) and the total number of lines the journal ID has so in this instance I want the count to be 2 and not 4.

Right now this is what i get

BUSN_UNIT_I JRNL_I CNCY_C SumOfMONY_A CountOfJRNL_I MinOfJRNL_D
CB001 0002888269 AUD 0 4 4/07/2014

This is the output i would like

BUSN_UNIT_I JRNL_I CNCY_C SumofMONY_A CountofJRNL_I MinOfJRNL_D
CB0010002888269323 AUD16797 2 4/07/2014

Im thinking with the total sum because theres debits and credits is there a way to do the absolute value of the journal MONY_A then divide by 2?

current SQL
SELECT [One Year Data Lines].JRNL_I, [One Year Data Lines].CNCY_C, Count([One Year Data Lines].JRNL_I) AS CountOfJRNL_I, Min([One Year Data Lines].JRNL_D) AS MinOfJRNL_D, [One Year Data Lines].BUSN_UNIT_I, Sum([One Year Data Lines].MONY_A) AS SumOfMONY_A
FROM [One Year Data Lines]
GROUP BY [One Year Data Lines].JRNL_I, [One Year Data Lines].CNCY_C, [One Year Data Lines].BUSN_UNIT_I
HAVING ((([One Year Data Lines].JRNL_I)="0002888269") AND (([One Year Data Lines].CNCY_C)="aud"));

View 9 Replies View Related

Count Of A Count Or Sum Of A Count? Newbie Needs Some Help.

Sep 20, 2005

Hi,

Just spent the past hour in here trying to nut this one out, but not sure I've found something quite the same...though I know the answer will be painfully simple.

I have a customer table and a product table, and a query that groups customer first and last names along with a count of products per customer e.g. 1,1,3,2,3,4,2,1 indicates customer A buys qty 1 of product z, customer B buys qty 1 of product x, cust C buys qty 3 of product y and so on.

All I need to do now is do something to also output the total number of products. ie as per example above, 1+1+3+2+3+4+2+1 to get 17.

Can I do a count of the count or do I do some sort of sum of the count results?

I've tried everything I'm capable of as a newbie, and I'm not having any progress.

Any help appreciated.

View 2 Replies View Related

Can I Do A "[Count] = [Count] + 1" In The Reports???

Sep 5, 2006

Hi all,

Do someone have a way to do a count function in a Reports to let the report showing the details at the same time do the accumulating of the number??

I had try so many way but it not work~~!!! Pls i need someone help cause i stuck my report there without the accumulating of the number, Thanks.

Regard,
alex

View 4 Replies View Related

Count

Sep 12, 2006

I having trouble trying to figure out how i can get totals in a report, the report picks the information up from a query i have set up. The report shows various data to do with Grades awarded as part of an audit process (1-4), i want to put a total in the report to count how many 1's, how many 2's etc. i not very experienced with access so can anybody help me with this.:confused:

View 1 Replies View Related

Help Using Count

Sep 10, 2007

So i have 2 fields(124816 records)
IMKEY, DOCBREAK

IMKEY is like an ID. And docbreak is like a page counter, where some records are empty and some arent(seperated by D's and some C's). im trying to find out 2 things
1> Count how many values are within each group in DOCBREAk.
example:

DOCBREAK DOCCOUNT<--trying to figure out
D 3
<EMPTYREcord>
<EMPTYrec>
D 1
D 4
<EMPTYrec>
<EMPTYrec>
<EMPTYrec>
C 1

I tried this query, but it counts everything, i just want to count how many values are within a group(C's and D's
Select COUNT(DOCBREAK) from Jan003;

in excel, i could of done it, but since excel has a limit how many rows it can support, i had to do it in ACCESS...

2>in the IMAGEKEY column, since DOCBREAK seperates and makes groups, im trying to as well get the beginning number and the ending number(1st and last number).
ex
IMAGEKEY Beg End
1 D 1 3
2
3
4 D 4 4
5 D 5 8
6
7
8
9 C 9 9

i did it in excel, but then again, for my personal use, i would like to know how to do it in access
heres how i got the 1st number in excel(A=imagekey, and B=Dockbreak)
=IF(B1="D",A1,"")
end number (C=DOCCOUNT)
=IF(C1="","",OFFSET(A1,C1-1,0))

can anyone help me out??

View 6 Replies View Related

Count = 0

Apr 20, 2006

I have 11 sites and I'm trying to missed visits at each site.

Currently I'm counting all non-missed visits at the site, and in the report I'm subtracting that number from Total # of patients at the site. This works fine - but there has to be a solution to the more "direct" method described below.

If I count up the actual missed visits and one site does not have any, the result only shows 10 sites and their totals. If the total count of missed visits = 0, is there a way to have access return that result?

I've tried changing the join relationship, inserting IF ([CountOfDay 30 Missed]) Is Null (or is 0) THEN .....

I know my naming conventions suck - I'm learning as I go, and I'm afraid to go back and change things now. Lesson noted for my next DB......

View 6 Replies View Related

Count/Sum Help

May 28, 2006

Hello,

Alright heres a problem for you's.

I have a table which holds roster information for staff. For each day in a 2 week period, there are 3 checkboxes, 'am' 'pm' and 'nt'. I need to perform a count on how many are 'am' 'pm' or 'nt'. For example, if 3 staff members worked on monday week 1 pm, i need it to return '3'. Problem is i am unsure how to perform a count on multiple fields?

Cheers

Derek

View 2 Replies View Related

Max Of Count

Oct 25, 2006

I'm struggling with this one.

first, I do a total query to retreive the frequency of a certain attribute

eg This produces

Customer Depot Order

CustA North 12 orders
CustA South 8 orders
CustA East 10 orders etc

CustB North 9
CustB West 11
CustB East 10

So now I want to retrieve for each customer, the Depot with the highest order count

ie

CustA North (12)
CustB West (11)

I can't find the right structure for the second query to generate the answer, because as soon as I do a group by, I get all Depots again! Or can I do the whole thing with one query.

If there are two similar max counts, ideally, I want to return either one. I suppose I could do a dlookup on the max count to retrieve the associated depot, but this seems sloppy.

View 5 Replies View Related

Count Or Sum?

Jan 16, 2007

I have two tables - one is the inventor name, one is the #patents and the business unit. (in a nutshell - these are the only fields I need from each)

I need a query to return the results:

Inventor Name #Patents BU

Joe Smith 28 W
Joe Smith 4 F

what I get is:

Joe Smith 1 W.....(28 times in a column)
Joe Smith 1 F...(4 times in a column)

I've read and studied and queried and tested until I can't see. This can't be that hard. Can someone help?

View 3 Replies View Related

Count Changes

Mar 14, 2007

Hi, I need to count how many times FarbeBC changed in value.
I don't need how many different values. That would be 4. But it only changed 3 times.


I managed to do this in excel. But can can't find out how to do this in access.

Any help from you guys?

I've Access 2000 with an ODBC connection to an SQL server.

DateEVT | FarbeBC
13/03/2007 06:14:09 | -M7X
13/03/2007 06:16:12 | -M7X
13/03/2007 06:17:12 | -92U
13/03/2007 06:18:35 | -92U
13/03/2007 06:20:53 | -92U
13/03/2007 06:21:57 | -92U
13/03/2007 06:23:00 | -92U
13/03/2007 06:24:31 | -92U
13/03/2007 06:27:24 | -92U
13/03/2007 06:28:43 | -92U
13/03/2007 06:29:47 | -84A
13/03/2007 06:31:09 | -M7X

View 2 Replies View Related

Help With Count...

Feb 29, 2008

Say I have the following database in Access:

Letter Name
(blank) Joe
c Joe
c Joe
c Sue
d Joe
c Sue

How can I know the know letter count without duplications for each unique name?
So for Joe I want it to return 3, (= blank + c + d).
For Sue it should return 1, only c is unique.

TIA!

View 8 Replies View Related

Count Help

Apr 29, 2008

Need help
When I try running the query below I get this error.

"Reserved error (-3025); there is no message for this error"

SELECT
totalelectricemergencies_1 = (SELECT Count(electricemergencies_1) FROM Phase_1 WHERE electricemergencies_1 ='Always'),
totalelectricemergencies_2 = (SELECT Count(electricemergencies_2) FROM Phase_1 WHERE electricemergencies_2 ='Always');

Any ideas?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved