Performing A Calculation On Two Fields

Dec 14, 2006

This is going to be a simple one for someone, but it is proving to be a pain for me. I have two collums in a table, one that is a value another is a quantity, i have another field that totals the two fields. This works fine and shows the total but it does not store the total into the database, how can i get it to do this.

In the Total field the control source is "=[Cost]*[Quantity]" i have tried to set it too TotalCost=[Cost]*[Quantity] but this gives me errors

Thanks for looking

View Replies


ADVERTISEMENT

Performing A Report

Sep 28, 2007

I have this table with this information...TABLE1code.............Name............Amount.....type'1000000'........'Name1'........... 0.00.....'N''1010000'........'Name2'........... 0.00.....'N''1010100'........'Name3'........... 10.00......'S''1010200'........'Name4'........... 5.00......'S''1010300'........'Name5'........... 0.00......'N''1010301'........'Name6'........... 1.00......'S''2000000'........'Name7'........... 0.00......'N''2010000'........'Name8'........... 0.00......'N''2010100'........'Name9'.......... 6.00......'S''2020000'........'Name10'......... 0.00......'N''2020100'........'Name11'.......... 3.00......'S'A need to create consult whose result show like this:RESULT'1000000'.....16.00'1010000'.....15.00'1010300'..... 1.00'2000000'......9.00'2020000'......3.00Could somebody help me this problem?. Thanks

View 3 Replies View Related

Performing Calculations In Reports

Nov 13, 2005

I have a table customers and Purchases. Customer table has the {name, lastname, tele, address, city ..etc.} and the Purchases table has the {name, sku, unitprice, qty, cost}

Is there a way to create a report that shows the total amount of purchases made by customer?

Also is there a way to round up values in reports such that if the value is 3.95 it says 4.00?

please let me know if more info is required.

View 2 Replies View Related

Calculation In Fields Of Two Different Tables

May 21, 2006

I have a field1 in table1 & field2 in table2. (field1&2 are numbers)
After designing the tables I linked them with an ID (which is primary key in table1).

When I created a tabular form based on these two tables & tried to enter data, two problems.

1) Error come unable to update / enter & help says its locked while when I check the property of Locked, it is set as 'No' & Enabled 'Yes'. Why I can't input data.

2) The calculation field2/field1*1000 does not appear in a textbox (where it is defined).

Nafees
nafeesjan@msn.com

View 1 Replies View Related

Performing A Match Query Between Two Tables

Oct 25, 2006

Hi,

I recently got a new job and am trying to learn access for it. I have two tables. Both of them have client id numbers. They are both supposed to have the same client id numbers. However, Table 1 has more client id numbers than Table 2. I want to do a match query that selects the client id numbers in Table 1 that do not have a corresponding match in Table 2. How would I go about doing this?

Also, I want to do a simple select query where I select the client id numbers in Table 1 whose first two numbers are "88." How would I do this in the query or SQL form.

Do you have any recommendations about the best way to learn Access for practical applications like this? I'll also need to get good at making Forms which seem fairly complicated.

Thank you for your time.

Rajiv

View 1 Replies View Related

Error In Performing Data Entry With SQL

Sep 3, 2015

now when I try the section performing data entry with SQL, I am at the point where I have typed the SQL statement:

INSERT INTO Employees(EmployeeNumber, [Last Name], Gender, HourlySalary)
VALUES ('227947','Jameson','M',18.85);

It chokes on the "unknown variable" HourlySalary, I could find nothing wrong with it.I then deleted my HourlySalary and copied theirs directly from the tutorial. It still chokes on HourlySalary.Now I am not sure what to do since I have taken their script and copied it to the SQL window.

View 4 Replies View Related

Reports :: Calculation For 16 Fields In A Report

Jun 23, 2013

I'm using Access 2010 and creating a report that is summing 16 fields but the wizard says I have too many fields selected. I had tried creating the report from scratch adding a sum field in the group footer but the field appears blank.

Below is what I am adding together all from one table. I have another report that will need to sum up 20 fields from a query.

=Sum([S1_MaxProfSupportAmt]+[S1_RateAirAllow]+[S1_RateRailAllow]+[S1_RateHireCarAllow]+[S1_MaxPersonCarAmt]+[S1_RateTaxiAllow]+[S1_RateParkingAllow]+[S1_MaxAccomAmt]+[S1_MaxAbsentAmt]+[S1_MaxBreakfastAmt]+[S1_MaxLunchAmt]+[S1_MaxDinnerAmt]+[S1_MaxIncidentalAmt]+[S1_MaxRoomHireAmt]+[S1_MaxSecretaryAmt]+[S1_AddNoteMaxAmt])

View 5 Replies View Related

Lost Data In One Field After Performing A Search

Aug 8, 2015

I have a form frmMember, it has a search button that performs a complex search of fields. after performing my search my [BaseDues] field shows #Name? BaseDues is set by a CBO in the field above.

It works correctly except after the search...

Here is the Code for the Search Button:

Private Sub cmdSearchForm_Click()
On Error GoTo Err_cmdSearchForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSearch"

[Code] .....

View 9 Replies View Related

General :: Calculation Of 2 Amount If Some Of The Fields Null

Oct 16, 2012

Calculation : In the event the null, is will become 0.

OT Qty: Nz([Qty(Overtime)-Nz([Qty(Work Hour)])

Is work to calculated the OT amount. How to set the value become zero in the event the the Qty(Overtime) was null.

View 4 Replies View Related

Queries :: Calculation Query To Add Values Of Three Fields

May 8, 2013

I created a simple calculation query to add the values of three fields:

Program_Cost, Auditorium_Cost and Millage_Fee.

I followed the steps found here: [URL] ....

But it doesn't work. The query pulls the values for the relevant fields but doesn't actually calculate the total. What am I doing wrong? Here's the query's SQL:

SELECT [Event Information].Event_ID, Sum([Program_Cost]+[Millage_Fee]+[Auditorium_Cost]) AS Total_Cost, [Event Information].Program_Cost, [Event Information].Auditorium_Cost, [Event Information].Millage_Fee
FROM [Event Information]
GROUP BY [Event Information].Event_ID, [Event Information].Program_Cost, [Event Information].Auditorium_Cost, [Event Information].Millage_Fee;

View 2 Replies View Related

Table With Four Fields - Calculation Of Total Time

Feb 21, 2013

I have created a table with four fields. The names are:1stBusOn, 1stBusOff, 2ndBusOn, 2ndBusOff.

I want the time for the first two fields and the time for the second two fields to end up in a field called TotalRideTime.

Also, if only one set of the fields are completed I still want that total time to in up in the the TotalRideTime field.

View 1 Replies View Related

General :: Performing Multiple Database Action On Button

Jul 11, 2012

I am writing an application for my personal use. I have 2 Access databases, one contains the data tables and the other has the forms, queries, reports, etc.

So far, I have been able to use the queries in the Row Source property of my form objects to accomplish what I want to do. Now I want to have a button that appends records to a table, the data in the table comes from several different controls on my form. After doing this the button should requery another control to display the new records added.

The OnClick event for the button allows me to use a Macro builder, Expression builder or Code builder. If I choose to use DAO in VBA code to append the records, do I have to define the database to create a database object to use even though the database is already open? Can I use a Macro to do this? Can a macro reference the data that is in the controls on my form?

View 6 Replies View Related

Queries :: Performing Keyword Searches Of Text Field

Nov 16, 2014

I am trying to perform some keyword searches of a text field. My preferred option would be to hold all the keywords in a separate table and then use something like

SELECT * FROM Text Table, Keywords Table WHERE (((InStr[Text Table].[Text],[Keywords Table].[keywords])) > 0 ));

This works and returns anything which has the string from the keyword table, however I wanted to look for whole words only. I can do this in SQL using a regular expression along the lines of [!a-z] keyword [!a-z] which only finds the string where it has no letters directly either side of it.

What I would like to do is combine the two methods so I hold my keywords in a table and then use them with the reg ex to find whole words only.

View 6 Replies View Related

Forms :: Performing Basic Math On A Specific Column / Row

Oct 10, 2014

how to do anything with it outside of tables and queries. I have been tasked with creating a form to do fairly basic things. Via tutorials I have managed to use the Expression Builder to do virtually everything I need except one thing.

I need to pull a value from row 2 in a specific column from a subform and subtract it from row 1 in the same column and subform leaving behind a + or - number for the user. Similarly, I need to do the same but subtracting the LAST ROW from row 1. If there is only one row at the time the operation is being performed, a value of No Data needs to be returned instead of a number.

View 2 Replies View Related

Queries :: Calculation That Counts Where Values Equals 4 In Fields

Nov 15, 2014

I have six fields in a record that look like Median.University1, Median.University2, Median.University3, Median. University4, Median.University5,Median.Unive rsity6. How can I create a calculated field that counts where values equals 4 in the fields . I have tried Dcount and Count with no success.

View 7 Replies View Related

Calculation Across Fields - Show Total Count For Each Record

Nov 14, 2014

I need a solution for the following problem:

For example:

............F1 F2 F3
Rec1 ....4 ..2 ..5
Rec2 ....3 ..3 ..1
Rec3 ....1 ..2 ..1

Now, I want to know how many 1s are there in Rec3 the answer is obviously 2 but I want a field(F4, for e.g) that calculates F1+F2+F3 showing all their 1s 2s and 3s.

A solution I found was...... F4=IIf([F1],1,0)+IIf([F2],1,0)+IIf([F3],1,0)

But I have over 50 Fields that contain 1s and 2s and I can't count them all by using this formula as it will be tremendously long and access will reject it.

So I need another formula(or function) that will look up for the 1s across multiple fields and show the total count for each record in a new field.

Tried 'look up' function but achieved nothing ....

View 3 Replies View Related

Forms :: Adding Three Fields In A Table - Time Difference Calculation

Oct 23, 2013

I want to add three fields in a table namely from, to and diff .

How to add them in a form so that I can enter

The time in (xx:xx) 24hr format in the "from" and "to" fields and calculate and save the time difference in minutes to the "diff" field automatically.

I am using access 2010.

View 8 Replies View Related

Grabbing Time Values From Table In Visual Basic And Performing Calculations With Them

Nov 8, 2004

Hi,

My boss wants me to program in visual basic, instead of using queries, a calculation between times, which values are gotten from a table. How do I perform a calculation between two fields from a table in code and what functions are there to calculate the amount of difference in minutes between times in visual basic? THANK YOU SO MUCH IN ADVANCE!

G

View 3 Replies View Related

Tables :: Auto Calculation In Sum Field After User Input (numbers) In Fields

Dec 28, 2012

I have a table, at the table I'v got these fields:

ID | num1 | num2 | sum

I want that the user put numbers at 'num1' and 'num2' fields and then the 'sum' field will calculate automatically the operator (sum=num1+num2).

I've tried to put any combination at 'Default value' of the sum field (all the fields are numbers , also tried to change the sum field to text...nothing works).

I'm getting a message that 'num1' field is not recognize at the table

(I tried =[num1]+[num2], without the '=', num1.table+num2.table , ...nothing works)

I also tried to do it with SQL command but it dosn't work.

There is any way to do it, is it possible? Or other way to do it at least at Form or at Report ?

View 7 Replies View Related

IF Then Calculation

Oct 11, 2005

Trying to calculate a few fields. 1st field is [delays] and 2nd field is [Planned]
The Plan scheduled for 60 and the Delays are an entered value. In the on update command button on the form I want code that will take the value above 60 and add then to the value in the [Delays] So if delays is 10 and the planned is 70 then planned will change to 60 and delays will = 20

any help

Jon

View 2 Replies View Related

Q:Calculation

Oct 24, 2005

Hi All.

I have 3 tables in Access:
tblCurrency (Fields: IDCurrency, CDate, CRate)
tblOrder (Fields: IDOrder, OName, ODate)
tblCalculation (Fields: IDCal, Rate1, Rate2, Rate3, COrder)
IDOrder is related to COrder with "One to Many" connection.

I have Form frmOrder, based on tblOrder. For Example Form has 1 record:
IDCal OName ODate
1 XXXX 2005.10.24

For this record related table has 2 records:
IDCal Rate1 Rate2 Rate3 COrder
1 10 3.5 15 1
2 6 4.2 12 1

tblCurrency for Exapmle have one record too:
IDCurrency CDate CRate
1 2005.10.24 0.2

In frmOrder I have textBox txtRate. Here I need to be calculated:

=Sum (Rate1*(CRate from tblCurrency Where tblCurrency.Cdate = tblOrder.Odate)+Rate2*Rate3 for Each record related to tblOrder).
By Exapmle: (10*0.2+3.5*15)+(6*0.2+4.2*12)=106.1

Please help with expression.
Thank You in advance.

View 3 Replies View Related

Need Help With Calculation

Jun 9, 2007

hey i hope some one can help me...

I am making a database for products and suppliers. Many suppliers can supply each product.

The product details are in a table called products, the suppliers details are stored in a table called suppliers and the suppliers offer for each product is stored in a table called prices.

the structure is as follows:

Table: Products
Product Name
Trade Price

Table: Suppliers
Supplier Name

Table: Prices
Product Name
Supplier Name
Supplier Offer

I have form that shows the product details and a subtable linked to the table:prices.

The problem

I need to add a field in the subtable called "Percent off trade" which is the trade price - supplier price / trade price * 100

i created a query showing the same records as the prices table plus the field "trade off price" and set the Field to:

Percent Off Trade: ([Forms]![Products]![Trade Price]-[Prices]![Supplier Price])/[Products]![Trade Price]*100

But this doesnt give me the correct percent :confused:

I hope i have explained this query and would really appreciate anyone who takes the time to suggest anything that could help

thanks in advance!

View 5 Replies View Related

Calculation

Nov 21, 2007

How can I multiplicate two numbers from two columns in a subform, show their result at the end of the row and then calculate sum of those results on the main form. This is something what I know how to do but the problem is following:

The total sum on the main form should be multiplicated wit 0,5 % and then reduced for a value of a specific row sum. It should be something like this: (Sum of rows sum * 0,5 %) - Sum of the specific row = Total sum on the main form. And all of this should be on a report too.

View 1 Replies View Related

What Calculation To Use?

Jan 2, 2006

What would I use for a formuls to find all product that are in stock.
like I have a price for all products that i stock, but some i don't have in stock. How would I query for the ones that I have in stock?
In my table I have it as UnitsOnHand, I have it as how many, like 1 or 3 or 4 etc. And also a field for Paper or Metal.
How would I query just for paper and not metal?
I am also going to need a query for the lowest price and the highest price.
Please understand I am New and I have allready search through all the post and can't seem to find anything close to what I am trying to do.
Any and all help would be great

Thank You
WackoWolf

View 10 Replies View Related

Need Help In Calculation

Jan 20, 2008

hi,


i'm working in a database and i face some problems in some calculation

this is my table which contain these fields:
NOC number
Company Name
Warning Letter


Note: each company has many NOC

Here what i need from the query

1- create a field which contain a total of warning for each month
2- create a field which contain a total of warning for each NOC
3- create a field which contain the total of warning for the company

View 3 Replies View Related

Help With A Calculation!

Feb 26, 2008

This is probably an easy calcualtion I am overthinking...
I am trying to make a query where I am calculating the "Total Value" of each customer's order of each item for the current week. The item "my company" is selling is fish, sizes small, medium and large all at different prices. I'm not exactly sure what they mean by "Total value", but I assume I take the cost times the quantity...but then what is the difference between Total Value and total ordered (in dollar amount)? Any suggestions?

View 2 Replies View Related







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