MS Access: Need Help W/ Calculation In Text Box

Jul 12, 2005

Could someone please help me with a calculation expression? I want the calculation to be in an unbound text box on the main form ([Primary View])which should calculate the sum total all records shown in the subform that contain a calculated field in the subform ([CBR Data Subform]!Rentable). The subform is set up in the main form to show records that pertain to one record in the main form. Right now, I have the following shown in the textbox:
=([CBR Data Subform]!Rentable) and I get a result but its not what I need.

I have tried:
=Sum([CBR Data Subform]!Rentable), &
=DSum([CBR Data Subform]!Rentable)

and I get error messages.

What other expression can I use or how can I improve the expression?

Thanks,

View Replies


ADVERTISEMENT

Text Field That Needs Calculation

Apr 16, 2008

So here is my problem i am semi access savy but i have having trouble with one thing. At work when we make a schedule there are 5 possibilites for how you want to mark your day. I have created a field using text as my parameters since my possibilities include both letters and numbers. At the end of each week I need to create a calcuation only utilizing the number which is 1 to add up the total shifts in the week.

I have tried some IIF statements with no luck. The 5 possiblities are 1, c,r,a,l. Each of the letters stand for something. When the scheduler runs the query he needs to see the letters or the number for each day. But i can't create a properly working calculated field for adding all of the 1's together only. The letters don't need to be added. Any ideas?

Also I have to run a sum for the total of each day at the bottom so I am running into the same problem there if there is any letters in the boxes. Going to a number field is not an option
thanks for the help

View 6 Replies View Related

Problem With Text Box Calculation

Feb 9, 2006

Hi all,
I have a form tha is based on a table and a subfrom on another.The two tables have a valid 1 to many relationship and all is well record viewing wise.
Now I have some financial data like the fee that was agreed upon on the main form on a text box .On the subform the user can enter the payments made on variou dates.
What I want is to be able to have a text box on the main form that will do the subtraction (fee - all the various payments) and display that on the main form.Is this possible cause I cant seem to be able to do it and if it is not, is there another way for this to be done.
Thank you very much for your time :)

View 1 Replies View Related

Variable For Holding A Calculation For A Text Box

Oct 8, 2005

Hello,
I've got a text box on my form header with a calculation in the control source that adds values from other text boxes on my form.
My problem is that since the calculation is in the control source of my text box I can not save the sum of the calculation to a field on the forms bound table.
Is there a way to move this calculation out of the control source and still have the calculation populate this text box with the sum of the calculation, so I can choice a field in which to save this calculations sum.

Calculation in the text box control source=
[Tot40yrcomp]+[Totfelt1536]+[Totfelt3036]+ there will be many more other text boxes added.

It was suggested to me to have a Variable hold the calculation, I’ve been trying to write a variable but nothing seems to be working, I’ve been trying to place this variable I made into the after update and before update of the text box Nothing works I get all 0.00 in the form header text box, Here’s the code for the variable I made, can some one see if it looks correct.

Dim calcVariable
calcVariable = [Tot25yrcomp] + [Me.feltstot]
mat25yr = calcVariable

I was wondering if I need to say Me.mat25yr = calcVariable

Thanks--Any help will be greatly appreciated.

View 1 Replies View Related

Variable For Holding A Calculation For A Text Box

Oct 8, 2005

Hello,
I've got a text box on my form header with a calculation in the control source that adds values from other text boxes on my form.
My problem is that since the calculation is in the control source of my text box I can not save the sum of the calculation to a field on the forms bound table.
Is there a way to move this calculation out of the control source and still have the calculation populate this text box with the sum of the calculation, so I can choice a field in which to save this calculations sum.

Calculation in the text box control source=
[Tot40yrcomp]+[Totfelt1536]+[Totfelt3036]+ there will be many more other text boxes added.

It was suggested to me to have a Variable hold the calculation, I’ve been trying to write a variable but nothing seems to be working, I’ve been trying to place this variable I made into the after update and before update of the text box Nothing works I get all 0.00 in the form header text box, Here’s the code for the variable I made, can some one see if it looks correct.

Dim calcVariable
calcVariable = [Tot25yrcomp] + [Me.feltstot]
mat25yr = calcVariable

I was wondering if I need to say Me.mat25yr = calcVariable

Thanks--Any help will be greatly appreciated.

View 1 Replies View Related

Query Calculation Depedent On Form Text Box

Mar 6, 2008

I have a make table query which needs to take the column "Amount Orig Ccy" from the table "Consolidated Reporting Table Orig CCY", divide it by the Canadian Spot rate input by the user into text box "Spot" on the form "Summary Form", and then populate the column "Amount USD" with the returns.

Should I be using the DLookup function? I tried the below without success:

Amount USD: DLookUp("Amount Orig Ccy","Consolidated Reporting Table Orig CCY"/[Forms]![Summary Forms]![Spot])

Then I tried this, again failing:

Amount USD: DLookUp("Amount Orig Ccy / Spot Rate","Consolidated Reporting Table Orig CCY","Spot Rate =" & [Forms]![Summary Forms]![Spot])

Is it a syntax issue or will DLookUp not work for what I need?

Thanks for any help.

View 3 Replies View Related

Forms :: Using Unbound Text Boxes And Calculation

Nov 12, 2014

Got a database that is working great

1 table - Employees
2 Queries
1) - QEmployees Extended
2) - QyrsEmp

2 Forms
1) - Employee Details (source control is "QEmployees Extended")
2) - Employee List (source control is "QEmployees Extended")

in Form "Employee Details" there is field named "HireDate" this field is also found in the table (records) "Employees" and "QEmployees Extended".When Form "Employee Details" is ran the "HireDate" appears as it should in the "HireDate" text box.

What I want to do is add a unbound text box to Form "Employee Details" named "txtYrsEmp" (Years Employed). and perform a calculation that will take the "HireDate" (date) and compare it to "Todays Date" and come up with the number of years employed rounded by 2 and show this result in the unbound text box called "txtYrsEmp"

Now I did a Qurey just to see if I could calculate what I wanted- "QYrsEmp" where in the first column I entered in the Field row (top) Expr1: EmployeeID from table Employee and in the second column I entered in the Field row (top) txtYrsEmp: Round(DateDiff("d"'[HireDate],NOW()/365.25,2))

Now the query returns the exact results I want so I know the calculation is possible at least here in the query.

View 7 Replies View Related

Forms :: Unbound Text Box Calculation Using Two Other Unbound Text Boxes

Jul 25, 2013

I am running in to a brick wall with this. I have an unbound text box with the control source set to =IIF([text42]=0,0,[text42]/[text44])*100 and in continues to return a #name? error.

I am not sure how to get this expression to work. I have even tried to put =[text42]/[text44] and I still get the #name? error.

View 3 Replies View Related

Text Boxes Control Source = Calculation Can't Save Sum

Oct 7, 2005

Hello,
I've got a text box on my form header with a calculation in the control source that adds values from other text boxes on my form.
My problem is that since the calculation is in the control source of my text box I can not save the sum of the calculation to a field on the forms bound table.
Is there a way to move this calculation out of the control source and still have the calculation populate this text box with the sum of the calculation, so I can choice a field in which to save this calculations sum.

Calculation in the text box control source=
[Tot40yrcomp]+[Totfelt1536]+[Totfelt3036]+ there will be many more other text boxes added.

Thanks--Any help will be greatly appreciated.

View 1 Replies View Related

General :: Text Box Calculation - Main Form And Subform

Oct 23, 2012

is it possible to calculate a values in a subform and main form. i thought it would be as simple as form to form but it doesnt seem to work.

ive tried this.

=[Forms]![frmDeparturesPaymentScreen-ItemListSubform]![txtTotalCost]-[txTotalPaid]

it just comes up with #NAME?

View 7 Replies View Related

Adding Calculation Field (text Box) To Assets Template Form

Apr 3, 2013

I am trying to add a calculation field "Status" (text box) to Assets template form i.e

IF Asset item = X
Status = present

But am getting #name? in the text box

View 3 Replies View Related

Access Calculation

Jul 18, 2007

i Want to make something in access for my job but i dont know how ... I have many years to use this software.

The idea is to have a FORM with many boxes .... http://img329.imageshack.us/my.php?image=58740895rq8.jpg

when i press product 1 and then product 2 i want to calculate, to give me the sum ....... i ll need to have many products i want to make calculations show i ve create one table from which i want to take the prices ...is it possible or it can be with an other way ?? :confused:

http://img525.imageshack.us/my.php?image=90673797oy7.jpg

Does anyone have a similar to saw me? :o

I need ideas !!!!


thanks!!!!

View 10 Replies View Related

Can Access Do Some Basic Calculation ?

Jul 3, 2005

I just want it to deduct:
one numeric field from another - to get a miles travelled number ?
one currency figure from another - to get how much more/less fuel was used than last month ?

also to work out:
an average of 3 figures
to multiply one figure by another ?

Is this possible ?
How easy is it ?

This is because I want to move my Excel spreadsheets to Access so I can alalyse it better and create custom reports. But despite browsing Access for a while, I can't find the features I need, or anything in the help file to help me.

I've been using Access for a few years (Access 2000) and have created two custom databases from scratch.

Jay Evans
IT Support Co-ordinator for Simply Drinks Ltd

View 3 Replies View Related

Access Calculation Problem

Nov 13, 2006

I need to find the average in a combination of 4 fields. In the footer of my sub form I have written =sum([amt paid in]+[dividends] / [units bought]-[units sold]). I have placed an unbound box in the detail portion with the following =[table1 subform].[form]![av dollars]. When I run the program, I get an outlandish number as the answer. I am a novice at this and any help would be greatly appreciated.

View 1 Replies View Related

Calculation Formulas In Access

Mar 19, 2015

I'm trying to build an calculated expression, in a table/query, similar to what you can see attached (view jpeg in att.)

View 1 Replies View Related

Price Calculation In Access Like Excel

Dec 11, 2007

Hi all,

Help me solved my problem with price calculation in Access.

Please kindly view below excel file.

http://www.hwakeat.com/templates/AT05HKGP01/pdf/Products.xls


I like to do formula price calculation in Access like my sample excel file. How many table should I create & How to build query? Whenever exchange rate change or MarkUp price rate change, I only want to type once & it will affect the whole access.

I have tried so many ways in Access but it doesn’t work like my sample excel file.

Please Help me!!

View 1 Replies View Related

Access 07 -- Automatic Calculation Of Difference

Aug 7, 2007

Hi, I am creating a table in 07 and I want my table to be able to calculate the difference between two amounts. I have the column "price" which shows the total amount, another one called "money paid" which shows how much of the total amount they have paid so far and the third is "money owed" which is the difference that i want to be calculated automatically.
Do you know any way to do this??

View 5 Replies View Related

Record Count For Calculation In Access

Dec 17, 2004

I need to be able to count the number of records in a report table in order to perform a calculation. For example record count/ total.
Thanks

View 1 Replies View Related

Queries :: Time Series Calculation In Access?

May 23, 2013

Let's say that you have a cookie jar that's to be shared with two children, let's call them Jack and Jill.

You know that to start with (t = 0), there are 100 cookies in the cookie jar

Now the strange thing about Jack and Jill is that they start eating cookies on different days and that their cookie appetite depends on the number of cookies in the jar when they start, Specifically

Jack has an appetite of 10% of the total cookie jar and he starts eating on day one.

Jill eats after Jack and she has an appetite of 5% of the jar.

So what this would look like is:

Day 0 - Cookie Jar has 100 cookies
Day 1 - Jack eats, Cookie Jar has 100 - 100(10%) = 90 cookies
Day 2 - Jill eats, Cookie Jar has 90 - 90(5%) = 85.5

Problem:

1. Given that I have a table containing the starting number of cookies e.g.:

CookieTable
Startingcookies
100

2. Given that I have a table containing a record for Jack and a record for Jill, each with two fields: Eating Start date, Appetite % e.g.:

AppetiteTable
Child, EatingDay, Appetite%
Jack, 1, 10%
Jill, 2, 5%

What will the query look like that:

1. Calculate the number of cookies in the cookie jar over time e.g.

Day 0, Day 1, Day 2
100, 90, 85.5

2. Calculate the total number of cookies eaten by Jack and Jill e.g.

Child, Cookies Eaten
Jack, 10
Jill, 4.5

View 1 Replies View Related

Queries :: Creating Particular Calculation In Access 2010 Query

Dec 9, 2013

I have played with this problem for 3 days and have come close but not quite solved it. My problem, I have several drivers delivering several orders, the orders are named 101, 102 and so on lets say to 150. Due to locations of the drivers, some deliver more orders then others. I want to be able to create a report that looks like

"Driver #1 101 - 106"
"Driver #2 107 - 110"

Driver 1 delivered 6 orders. Driver #2 delivered 4 orders and so on.

I have tried the 'count" which gives me the number of orders per driver but having trouble figure out the design of the calculation in the query.

View 2 Replies View Related

Forms :: Make Calculation For A Specific Row In Access Form

Jun 16, 2013

I'm pretty new to Access. I was wondering if it's possible to make a calculation for a specific row in an Access form.

I placed an example in the attachment (I made it quick in paint, because the actual Access form is in my language "Dutch" ):

Value1 and Value2 come from a database, so the amount of rows can change. When I click on "Calculate" on the first row, it should calculate 12 * 13 and show the solution only on row 1. If I click on "Calculate" on the second row, it should show the solution of 10 * 20 only on row 2.

I tried to solve this by using the following VBA code:

Private Sub Calculate_Click()
Solution.Value = Value1.Value * Value2.Value
End Sub

But if I click on the first "Calculate" button, it will fill all solutions with the first calculation (12 * 13).. The same happens when I click on "Calculate" on the second, third row etc.

View 2 Replies View Related

Modules & VBA :: Access 2010 / Form To Table Calculation?

Jun 7, 2013

In Access 2010 is it possible to have a tblKits with a column on it Reactions 8. Then on a form a field Used. When thee user inputs 2 into the Used field can the Reactions on in the tblKits be updated to 6 automatically?

View 1 Replies View Related

Modules & VBA :: Moving Rich Text From Access Memo Field To A Word Text Box

Jul 24, 2015

We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.

Dim What As Word.Shape
Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0)
Dim sPath As String
sPath = "G:Temp.html"
Open sPath For Output As 1
Print #1, "<HTML>" & pprs!What & " </HTML>"
Close #1
What.TextFrame.TextRange.InsertFile (sPath)

View 2 Replies View Related

Creating A Table In Access From Text A Text File

Oct 10, 2007

Hi all,

I have a text source file and inpul layout i.e. field names start and end positions in excel file. I want create a table in access from the text data using excel file layout.

Can you please help me out in this. I am a mainframe programer and recieved an request to work in access.

View 1 Replies View Related

Calculation Of Field Based On A Field In Access 2000

Nov 8, 2004

KTYPE=text; EXPIRATION_DATE=date/time; OVERAGE=date/time

im doing a report based on a query (which has a few fields, including KTYPE, EXPIRATION_DATE, OVERAGE). im trying to determine the OVERAGE based on the following conditions:

here are the conditions:

if KTYPE="PO", then OVERAGE:=(EXPIRATION_DATE + 6 months)
ie.. KTYPE=PO, OVERAGE:=(01/04/2004 + 6 months) = 07/04/2004

if KTYPE="IAA", then OVERAGE:=(EXPIRATION_DATE + 20 months)

if KTYPE="FA", then OVERAGE:=(EXPIRATION_DATE + 12 months)

and so on and so forth.

I'm very new to Access. What formulas do I use and do I put the formula in the query or the report.

Please help. thanks in advance

View 2 Replies View Related

Text To Columns In Access

Jan 11, 2007

Hello all,
I have a datasheet with a list of names stored in a cell, separated by semi-colons. I want to separate that list into separate columns. In Excel, I would use Data/Text to Columns. Is there some sort of Query something that would do that for me in Access?
Please advise!
tia
Angel

View 1 Replies View Related







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