Reports :: Sort Records By A Calculated Percentage Using Text Box Values

Jan 27, 2015

So I have a report with the following text box controls:

[Surname] & ", " & [Firstname]
=Sum([Quarter1_A]) - Named "Quarter_Total"
=Sum([Quarter1_T]) - Named "Quarter_Target"
=Val([Quarter_Total])/Val([Quarter_Target]) - Named "%Target" (Percent Format)

The report is grouped by the expression '[Surname] & ", " & [Firstname]'.I am trying to sort the records by the %Target text box. I tried entering the expression into the sort function but it still sorts by the grouped expression. I also tried sorting by the name of the text box but got the same results. How can I sort by the desired control?

View Replies


ADVERTISEMENT

Reports :: Calculated Text Box With Values Less Than 600

Feb 10, 2014

I have a textbox in a report that I would like to calculate the sum of values that are less than 600.Then have a second textbox that counts the number of records that have values less than 600..This is based off of a query with calculated fields..I have been working with a formula that looks something like this

=Sum(IIf([BaleETime]="<600",0))

But all I get is a value of 0.BaleETime is the elapsed time between bales.

View 3 Replies View Related

Sort Subform Records On Numeric Values Stored In A Text Field On Main Form

Sep 25, 2015

I have developed a database but have had difficulty with sorting data within subform of a main form. The subform displays the related tasks that correspond with main form that has been selected. Within the main form I have also created a text field that defines a particular sorting sequence of the tasks found within the subform which is titled Task Sequence. What I would like to do, is use the Task Sequence field to sort the order of tasks within subform. I have tried: IIf([ID] Is Null, 0, Val([Task Sequence])) within the Advanced filter/sort but either it shows only the first task defined in the Task Sequence or it wants to filter the main form and not the subform.

View 14 Replies View Related

Reports :: Zero Values And Calculated Fields In Reports?

Nov 13, 2013

I am trying to get calculated fields in my report to work but zero values in the data are throwing up #Div/0! and #Error! and #Num!

The main data fields I am trying to work with are:

VehicleReading
PreviousReading
VehicleLitres

My aim is to track mileage and consumption for a fleet of vehicles and show daily and weekly averages in mileage and consumption and then to flag 20% increase in consumption.

I have a calculated field in my report named Kilometers,

= [VehicleReading]-[PreviousReading]

and also a calculated field named Consumption,

=[Kilometers]/[VehicleLitres]

My sum and average calculation fields in the group footers are only working where there are values above zero in the Kilometer and VehicleLitres and Consumption fields.

In reality there are some days where there has been no travel, so some records will have a zero for the Kilometers field and there are also days when there has been no refueling so there is a zero for the VehicleLitres field.

I have tried using the expression builder to create an IIf function but to no avail.

I have tried copying the syntax suggested by the Expression builder:

«Expr» IIf («expr». «truepart». «falsepart»)

I know I need to get those zero's to fail in the calculation but as I said before all of the suggested expressions I have tried fail due to syntax!

View 11 Replies View Related

Reports :: Zero Values And Calculated Fields In Report

Sep 17, 2013

I am trying to get calculated fields in my report to work but zero values in the data are throwing up #Div/0! and #Error! and #Num!

The main data fields I am trying to work with are:
VehicleReading
PreviousReading
VehicleLitres

My aim is to track mileage and consumption for a fleet of vehicles and show daily and weekly averages in mileage and consumption and then to flag 20% increase in consumption.

I have a calculated field in my report named Kilometers,
= [VehicleReading]-[PreviousReading]

And also a calculated field named Consumption,
=[Kilometers]/[VehicleLitres]

My sum and average calculation fields in the group footers are only working where there are values above zero in the Kilometer and VehicleLitres and Consumption fields.

In reality there are some days where there has been no travel, so some records will have a zero for the Kilometers field and there are also days when there has been no refueling so there is a zero for the VehicleLitres field.

I have tried using the expression builder to create an IIf function but to no avail. I have tried copying the syntax suggested by the Expression builder:

«Expr» IIf («expr». «truepart». «falsepart»)

However I keep getting error messages and despite troubleshooting and looking on the internet I can't seem to find a solution to this.

View 9 Replies View Related

Forms :: Sort Values / Text Based On Active Field

Feb 5, 2014

In a form is there a way to change sort order based on which field is active?

I'm using a Split Form which gives me the ability to sort by clicking on the header name ans selecting sort. This slowing things done since my workload is heavy.

View 3 Replies View Related

Reports :: Can't Sort Records In Sub-report

Oct 29, 2013

I am using Access 2007.I have a report that has 2 subreports within it.One of the sub reports input is from a table (Work Order Parts) whose records have a field called "DisplayOrder". This is a numeric field that I use to enable the user to specify the exact order that they want the records to be displayed in a form or report...well that's the plan anyway.

I can't seem to get the subreport to sort on the "DisplayOrder" field.

I have tried to set the Property value "Display Order" to "[Workorder Parts].DisplayOrder" but this doesn't seem to make a difference. The "Order By on Load" is set to "Yes".

Here is the "Record Source" value : SELECT DISTINCTROW [Workorder Parts].*, Parts.PartName, [Workorder Parts].Notes FROM Parts INNER JOIN [Workorder Parts] ON Parts.PartID = [Workorder Parts].PartID;

What am I doing wrong?

View 5 Replies View Related

Reports :: Report Thinks Calculated Field Is Text

Oct 21, 2014

I'm creating a report to check for over- or under-stocked items. The report is working fine, gets all the records etc. except that it thinks that the OnHand field from my inventory query is text or something, at any rate not a number. I have successfully set the format of the field in the query to General Number, but that doesn't seem to have worked. Here's the SQL for the report:

Code:
SELECT DISTINCT Signs.SignCode, Signs.SignDescr, Size2.XYdim, qryOnHand.OnHand, Bins.Rack, Bins.Level, Bins.BinNum
FROM (Size2 INNER JOIN (Signs INNER JOIN (Items INNER JOIN qryOnHand ON Items.[ItemsID] = qryOnHand.[ItemsID]) ON Signs.[SignID] = Items.[SignID]) ON Size2.[SizeID] = Items.[SizeID]) INNER JOIN (Bins INNER JOIN InventoryDetail ON Bins.[BinID] = InventoryDetail.[BinID]) ON Items.[ItemsID] = InventoryDetail.[ItemsID]
WHERE (((qryOnHand.OnHand)<=[Check for signs with fewer than:]));

View 14 Replies View Related

Reports :: Appending Text Item To Each Value In Calculated Field Data

Oct 20, 2014

I would like to append a text item to each value in a calculated field. consider the field name is "Division" and I want to append the word "Division" to the values put out by the field "Division"

My attempt was: Division & " " & "Division". This produced an error in the report.

View 4 Replies View Related

Reports :: Variable Used In Calculated Text Box Gets Treated As Parameter Query

Apr 8, 2013

(a) The On Open event of my report contains a VBA Sub that assigns a value to a variable named vShow. (Tracking the sub in VBA shows that vShow is correctly being assigned the desired value.)

(b) I then use vShow to try to control a calculation that occurs in one of the text boxes of the detail section in the report

(c) Basically, the control source of the textbox contains (in part) the statement (vShow>[fieldA]), which is embedded in a longer function.

(d) However, when I type this in at Control Source box of the Data tab of the the Property Sheet, Access always substitutes "[vShow]" for "vShow".

(e) So what I get is ([vShow]>[fieldA]), which treats vShow as the parameter of a parameter query.

ANY WAY TO OVERCOME THIS AND HAVE vShow recognized as the variable I defined at On Open? Perhaps there needs to be a variable declaration there, that I don't understand.

The basic form (vShow>[fieldA]) does not seem to be the problem, because I can enter, e.g. (500>[fieldA]) and everything works OK.

View 2 Replies View Related

Queries :: Sort By Percentage Match To Multiple Field Search

Mar 19, 2014

We're trying to create a database to read quotes from a system based on changes made to components.

We have the database set up to store the quotes happily. We're pleased with the input forms and data capture however we are struggling with a query to get useful data from the database.

I have a main quote data table listing all the required fields such as costs and supplier data for the quotes, a table storing components that may be changed as part of a quote and a table listing alterations that could be made to these components. Each quote could have a number of changes made to a number of components. All these changes are stored in a changes made table which lists the quoteID, ComponentID being changed and The AlterationID of the alteration being made.

I want to be able to input a varied amount of changes via a form and be shown a list of all quotes where at least one change matches. I've managed to get this far using a lot of OR statements however the complexity is introduced as we need to sort these by an extra column produced by the query displaying the percentage the changes made in the quote match the search input.

If a quote appears matches my changes and there are no other changes on the quote - (100%)

If a quote matches all changes I have input but I input 5 changes and the quote has 6 - (5/6 - 83%)

If I input 1 change and a quote matches but has 8 changes on the quote - (1/8 12.5%)

View 2 Replies View Related

Queries :: Calculated Field - Converting Percentage Marks With Grades

Mar 11, 2014

The calculated field converts all percentage marks perfectly fine with grades except 100 which returns to a stupid "E" . I've been trying all sorts and now give up.

Code:
Grade:IIf([Percentage]<20,"U",IIf([Percentage]<30,"G",IIf([Percentage]<40,"F",IIf([Percentage]<"50","E",IIf([Percentage]<60,"D",IIf([Percentage]<70,"C",IIf([Percentage]<80,"B",IIf([Percentage]<90,"A",IIf([Percentage]<100,"A+")))))))))

View 1 Replies View Related

How To Sort By A Calculated Field In A Query?

Jul 21, 2006

I have a query that draws from two tables, and the field in question looks like this:

X: [TableData]![FieldA]*[TableNumbers]![A]+[TableData]![FieldB]*[TableNumbers]![B]


It all works fine and dandy, but once I set it to sort by this field and run the query, it gives me the parameter prompt, asking me to enter the Parameter Value of FieldA and then for FieldB.

Is there a work-around for this within the query?

The only other solution I have in mind is making another table from this query, and then creating another query just for sorting said table, but that seems inefficient at best.

View 2 Replies View Related

Sort On Calculated Date Field

Mar 16, 2008

I have an expression in a query

Expire: IIf([payterm]="X","",DateAdd([payterm],1,[orderdate]))

However when I sort it it does not sort in correct manner

it's goes like

1/11/2007
1/15/2008
10/10/2006
10/16/2007
10/31/2007
10/5/2006

I have the field properties set to Short Date.

What do I need to do for this to sort right?

View 2 Replies View Related

Sort By A Calculated Date In A Query

Apr 1, 2008

I have a calculated date field in a query...if I try and sort by this field I get a data type mismatch.

[CONTREFF] is a date field in a table, [TERM] is a number field in a table. I am trying to calculate the year the contract expires in the "EndTerm" field. The calculation works fine, but I can't sort it.

EndTerm: DateSerial(Year([CONTREFF])+[TERM],Month([CONTREFF]),Day([CONTREFF]))

Please Help!!! Thank you ...

View 3 Replies View Related

Percentage Values On A Form

Dec 7, 2005

This is a very minor problem. But it's one of those things that will bug me to no end. I have a discount field on a pop up form whose format is set to percentage. The field it is bound to is also set to percentage. When the user entered, for example, 50, the field would change to 5000%. So in the AfterUpdate I divide the value by 100. This works fine. The issue that's got me stumped is the appearance of the value. When the value is 50.00% and the text box receives focus, the appearance stays 50.00%. When the value is 10.00% the appearance changes to 0.1. I've entered various values and some change and some don't. Would anyone know why?

View 1 Replies View Related

Tables :: Linking Records In One Table To Multiple Records In Another And Assign Percentage?

Nov 21, 2012

I have a table (tbl Team Info) which contains names and codes for teams within my business (>400 records) and another table (tbl Process) which contains a list of high level tasks (30 records).

I need to create something where for each team name 9in tbl Team Info) I can map them to the tasks that they undertake (in tbl Process) and assign a percentage of time then spend on each task. Each team could map to several different tasks.

View 3 Replies View Related

Queries :: Pivot Charts - Displaying Values As Percentage

Apr 8, 2014

I work at a program where we have individuals try out for a field (coming from various backgrounds). The program has been in place since 2012, and I wanted to start looking at the data for analysis and comparing trends, etc; I imported our master file (excel) into Access. It's in one big table, column headings include roster number, name, gender, type, FY (fiscal year), and finalcode (Select, Non-Select - but put it in as 1 or 2 in the field)).

I created a query, and was able to get data I was looking for.I then set it to Pivot Chart (bar graph).

Bottom (Believe its X) Axis: I have Type, Year.
Right Side of Chart (TypeCodeNumber)
Top of Chart: Count of CodeNumber

It gives me the totals (whether select or non-select) just fine, but I have been racking my brains, watched tons of YouTube videos and read a lot on how to make it give me a percent. I found a way to go Percent on the left side of the bar chart, but the Values go up to say 3300%. I know the problem is with the Count up top.

View 7 Replies View Related

Queries :: Calculating Percentage - Exclude Null Values From Expression

Mar 10, 2014

I'm trying to create an expression to calculate percentage.

The fields, Value A and Value B might both have null values, but I do not want Access to treat nulls as zero (as in the Nz() fn). How do I get the expression to exclude any nulls and not calculate for those rows, but set the calculated value for a row with null A or B to zero.

I want it to set no calculated value to zero so I don't get overflow errors and can therefore order the data by the calculated field.

View 1 Replies View Related

Reports :: Calculate And Display Percentage In Columns

Nov 7, 2013

I have an Access 2009 report that displays the sums at the bottom of some columns. Is there a way to calculate and display the percentage one sum is of another?

Column1 Column2

Total 12,000 9,800
Percentage 100 % 81.7 %

View 1 Replies View Related

Reports :: Calculating Sum (count) And Percentage Field

Jun 16, 2013

I am trying to work out the expression that will first count the number of 'Yes' returns in a series of yes/no boxes and then display as a percentage.

To explain...The yes/no boxes represent attendance over a 20 lesson course. I have added a count for each lesson for student attendance..(grouping them in the footer) but I would like to add the number of attendance for each student.

View 1 Replies View Related

Reports :: Summing Calculated Fields On Reports And Tables To Include Cents?

Feb 18, 2014

In my tables i have used calculated fields. one of the fields is to "total expenses." In a report, i need to show the sum of all the "total expenses", the filed populates in the report but the cents are missing. for example if the amount is 6080.40 it shows as 6080. how can i get around this? I have tried changing the decimal point value to 2 at which point the value turns to 6080.00 when it should be 6080.40 (i am a beginner at this i am assuming the answer will probably involve c++ or visual basic's, two concepts i am not familiar with.)

View 2 Replies View Related

Queries :: Getting A Percentage From A Text Count

Jun 11, 2013

I have a query that has clients sorted in the row area and a column from my table that is set up as text but only has yes/no options for the data. I have a pivot table that counts the yes's and counts the no's and finds a grand total; however, I want to be able to find the percentage of pass's given the grand total. I'm able to do this in Excel and was wondering if it was possible in Access.

View 2 Replies View Related

Modules & VBA :: Text Box Percentage Format

Mar 2, 2015

I have set the format of a text box (named: scrILS) to percentage. It shows on the form as 0.00%

When I try to run calculations off of it like: = [scrILS]*[totBuysFYDP1], it throws this error: #TYPE!

It seems as though the textbox is keeping it as text for the percent sign "%" is preventing any calculations against it... here's the strange part... it doesn't happen initially when I open the form... the calculations work and I get no error, but I have code that recalculates everything based on values picked in a list box... on the requery I get the error.

When I look at the watch frame for that control it shows the scrILS value as:
"00.0%" not 00.0%... any thoughts on this?

I attempted to just take the thing as a string and use a replace function against the "%" then calculating... that works, but then the initial form load throws the error.

Seems like I am missing something in the property settings, but I don't know what. Is there something that forces the format value, setting percentage as a number vs. text?... I thought that was just part of the format setting...no?

View 1 Replies View Related

Converting A Percentage Field From A Text File

Dec 31, 2007

I have a text file delimited and uploaded the information to a new Access Table. One field "MarketValue" has a number followed with a percentage (i.e. 100%, 54%, etc..), however it converts as a text column.

How can I convert the column to a TRUE percentage field representing the value originally imported.

View 5 Replies View Related

Text Field Data Conversion To Percentage

Jan 22, 2008

Hi all,

I would very much appreciate help with this one. So thanks in advance if anyone can help.

I have a table which has a Text Field (it has to be, I'm afraid). The data is listed as follows:
5.6%
12.23%
2.45%
etc.
I need to use these values to multiply other figures in queries. I have tried FORMAT and various other ways in the query to convert the data, but to no avail. All I get as a result is an ERROR. Anyone got any ideas?
Ginny

View 6 Replies View Related







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