Calculating Between Fields In A Table And The Sorting

Jan 27, 2008

Below is an example of my table "Pricedata" include 03 fields:

Stock Name ___Price________Status Date
A________________10________ __1/6/2008_
A________________11___________1/7/2008_
A________________12___________1/8/2008__
B________________22___________1/6/2008_
B________________25___________1/7/2008_
B________________29___________1/8/2008__
C________________2____________1/6/2008_
C________________2____________1/7/2008__
C________________3____________1/8/2008_
D________________56___________1/6/2008_
D________________45___________1/7/2008_
D________________27___________1/8/2008__

I want to create a query like this: can calcualte the price change and % price change in certain period, and then sort in % change.

This result should be like the table below:
StockName Change in three days % Change in 03 days
C 1 50%
B 7 31.8%
A 2 20%
D -29 -51.78%

Thanks all,

View Replies


ADVERTISEMENT

Calculating Elapsed Time In The Table Fields

Jul 8, 2015

I have been trying for about 8 hours to calculate elapsed time between two fields into a third field in Access 2007. Unfortunately, the expression

IIf(IsNull)([Final Suspense]),DateDiff("d",[Routing Status Date],Date()),DateDiff("d",[Routing Status Date],[Final Suspense]))

is not working. Image enclosed....

View 6 Replies View Related

Sorting A Table, Apply The Sorting To A Form

Mar 10, 2006

Hi all.
I've created a database which contains information about stores. I want to have the forms automaticly sorted by the department number.
I've tried to sort the table by department, but when I try to add a department, the sorting doesn't seem to affect the form at all.

Lets say I have department 1,2,3,6,7,8 in the form, and I add department 4, it will be the last post in the form. I want it to be the fourth, and so on..

I'd apreciate some help with this :) Thanks

Here's the database (http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=12934&stc=1&d=1142018915&PHPSESSID=f730b7f11f6983965698faeacbe5a1ee)

View 5 Replies View Related

How To Group Fields And Corresponding Fields, While Calculating Sums?

Aug 4, 2005

I have two tables - Hours and Employees. Employees table has these fields:
EmpID, and First, and Last name.
Hours table has these fields:
EmpID, Hours, Funding Source, Nature of Work, Pay Period

I need to produce a report or a query that will display these results:
A column with a list of all the employees and all the Nature of Work categories going across with the sum of hours for each Nature of Work. I'm attaching an Excel spreadsheet that shows kind of what I need. Also, these reports need to be produced for each Funding Source and
Pay Period, so something like [Enter Funding Source] and [Enter Pay Period]

My question is that I don't know how to make a report that will just list a column with all the names and count the sum of hours for each Nature of Work.

Hope this is not too confusing, and any help would be greatly appreciated. thank you!

View 8 Replies View Related

Need Help Calculating Using Fields In MainForm And Fields From Subform

Sep 25, 2006

Ohh Stress. Need Help....I have a mainform that contained two subforms in it. MainForm called "Employee", the two subform called "vac", and "Prevac". There is a field in my mainform called "Hours", that I'd like to use to Add with a field in Vac subform called "VacA" and a field in Prevac called "FHours". I'd like to display the total (sum of all three field on the same mainform. Is there anyone have any idea? Thanks in advance...

View 3 Replies View Related

Sorting Count Fields

Feb 1, 2006

How do you sort on a count field in a report

View 4 Replies View Related

Sorting Multiple Fields

Mar 19, 2007

I have a database with different "Categories": hotels, kennels, pet sitters, etc. I need to sort it so that I can export and print it. It needs to be sorted as follows:
State|City|Category. Whenever I do a sort it ends up giving me all of the hotels first (by state and city), then the kennels (same way), and so on. I need them integrated so that within each City, first come the Hotels, then the Kennels, then the Sitters, etc., and then on to the next city.
Is there an easy way to do this, without knowing SQL or other programming?

View 2 Replies View Related

Forms :: Sorting Fields In A Form?

Mar 14, 2013

How is the easiest way to sort fields in a form. A database view sort is no problem but I can find no way to sort a fields in a form short of using a query. I am using Access 2010.

View 2 Replies View Related

Calculating Fields

Nov 10, 2005

i have two text boxes in a form:
1) Todays Hours
2) Total Hours

when i enter a number in text box todays hours i want the value in the text box total hours to increment by that amount. this operation will be done on a daly basis for a internet cafe where the user comes and i put in the hours. it seems simple but i really do not know. could someone help me please :confused:

View 1 Replies View Related

Calculating Across Fields

Dec 20, 2007

Hi,

I am creating a form which has many fields which should have values in them. I need to know how to total all the fields across each field.

I have managed to do this(almost!) by creating a text box, and "on lost focus", putting the VBA:

TextBox = [SumOfConnection Bonus] + [sumofspice bonus] + [sumofvolume bonus]

(When I get this working I'll make a field in the table so there is no need for the text-box.)

This is basically, three types of commision that I want to total at the end in a "total". The amounts of commision are obviously different for each record but when I click in the "TextBox" it totals the values for the record that box is in ONLY, and all records show the same value in this field. I will click in a different box, and it will change, but ALL of them will change. How do a make it so that all "TextBox" field will show their own value.


Thanks,

View 2 Replies View Related

Forms :: Sorting Multiple Fields On A Continuous Subform

Feb 10, 2015

I'm trying to use the following code to programmatically sort four fields on the continous subform:

Code:
Me.SPlanChange_03_OFFSET.Form.OrderBy = "AOBJ ASC, ORG ASC, AVAILABLE DESC, AGFND ASC"
Me.SPlanChange_03_OFFSET.Form.OrderByOn = True

It appears that the code works partially - the values in the "AOBJ" field are as they be and so are the values in "AVAILABLE" field. The values in the "ORG" and "AGFND" fields will not sort.

Is what I'm trying to do even possible?

View 1 Replies View Related

Reports :: Sorting By Boolean Fields - Print All Different Combination

Feb 20, 2015

I have 3 fields Yes/No.

A B C

To be in order it is necessary that: A , B and C = Yes.

I would want to print all different combinations :

A = no et B et C = Yes
Then
A: Missing

Nom, prenom et adresse.
.....
.....

A = Yes, B=No and C = No
Then
B and C missing :

Nom, prenom et adresse.
......
.......
Etc.....

View 1 Replies View Related

Calculating Difference Between Two Fields?

Feb 22, 2007

I'm trying to create a database for a Cattery business.

One thing I'd like to include is a query that calculates how long a cat has been staying at the cattery and then calculating the amount owed by the owner.

I don't have a cost field in any of my tables, so I need to create this on every run of the query.

So for example

A Cat resides in the cattery from the 22nd of Feb to the 28th of Feb. So 6 days (not including the day the cat is brought into the cattery) at a cost of 4.95 a day equals 29.7

Heres what I have so far
http://www.tdh1987.co.uk/pics/query.JPG

Bear in mind I'm from the UK, so the date field is in a different format to yours.

Any help will be greatly appreciated.

View 3 Replies View Related

Calculating Bound Fields

Oct 3, 2006

I have a table for invoices that need to show Nett, VAT & Total. I have set up a form and have included a calculation on both VAT (Nett*17.5/100) and Total (Nett+VAT) which works well in the form. Because these calculations are in the ControlSource, I do not know how to have these fields bound to the original table.

Am I missing something really obvious???

View 1 Replies View Related

New Member - Calculating Fields Help

Jan 4, 2005

I am new to Access and have made a databse using Access 2000. This is used for a dart league.

In one of the Tables called Members each "record" is made up of the persons details
(Name,address, etc). Included in the Row record I have "fields" (columns) that keep track of
the points each person hits on a nightly basis. I also have a Total Field.

Exampleof fields)

ID#,First Name, Last Name, Address, Phone #, Week 1, week 2, week 3, Total

How do I get the Total Field in the record to add up the nightly points in Week 1 + Week 2 + Week 3.?

In Excel it would be a simple calculation (e.g =sum(a1+b1+c1) etc.

As I said I am new to this database and it is very frustrating at the moment. I have used the help function
but it mostly double dutch to me.

ANY HELP in plain english would be appreciated

View 1 Replies View Related

Calculating New Fields In Access Database

Nov 20, 2007

I am working on a system to store financial information. I will be extracting our accounts payable journal entries on a monthly basis into Excel. I want to import that data into an Access table. I have several calculations to perform to create new datafields that I need to store in my Access table. Is it possible to perform these calculations as I load the data? If so what the best method to do this? Here is an example. I will be downloading our monthly hardware depreciation and need to split it among departments based on % stored in another Access Table.

Thank you for any help you can provide me.

Teresa

View 1 Replies View Related

Calculating Total Costs From 2 Different Fields

Dec 21, 2005

I have a table with products and their costs per unit of measure.

some products are costed by weight and others by piece.

table looks something like this:

product
pcs
weight
unit of measure (EA or KGS)
cost

Query should look like this:

product
pcs
weight
Total Cost

Is it possible to write an expression that, depending on the unit of measure uses the pcs or weight field to calculate the total cost ??????

View 5 Replies View Related

Query Help, Calculating Multiple Fields.

Jul 30, 2007

I've imported an Excel file into a table and now I've created a Query from it.
I now need to Add Fields (names are not in the table) and calculate totals for these renamed fields some of the answers are going to be the result of two or three fields.
Any help would be greatly appreciated.
thanks

View 8 Replies View Related

Calculating Two Fields From A Form And A Subform

May 6, 2005

I have created a form with a subform and I want to subtract the total of the subform from the total of the form to get a balance; i.e. I have a total of expenses on the form and the subform is a record of payments against the expenses and I want to show a balance.

I have been all over this one and can not make the expression work. I have been working in Access for some time but this one has me stumped, I am probably over thinking it or just can't see the forest for the trees.

I have gone into the expression builder and created the formula but when I complete the process I get the #name? error statement in the field.

Can anyone help me with this problem? Thank you in advance. You can send responses to sharon.dunn@newmont.com.

View 2 Replies View Related

Of Saving Queries And Calculating Fields

Sep 6, 2005

Morning All,
Just wondering.

When a form needs a calculated field. Say something simple, like

TotalCost = Quan*Cost

Is it better to create a query?
Use a table and create the calculated field in the query builder?
Or use a table and create a new unbound field on the form with the formula in it?

I never really know which one to do.

Lately I’ve been using saved queries for almost everything and now I have several dozen in this data base and its only half way done. Soon I’ll have to create a data base just to keep track of the queries in this one.

View 7 Replies View Related

Expressions For Calculating Text Fields

May 27, 2014

I am trying to create an expression that determined by text fields. The field is a PASS for FAIL field. The result needs to =PASS if 70% of the total column is PASS.Can this even be done using an expression?

View 4 Replies View Related

Forms :: Calculating Fields And Auto Update

Jun 15, 2013

In this table I have two fields Seats Available and Seats Remaining

When I register a student to a Course in the Courses table I would like the corresponding Seats Remaining field for that course to decrease automatically.

I can, of course, run a report or a query to see how many are enrolled in the course and then manually update the Seats Remaining field (which is what I currently do), but I would like this process to be automated each time I register a new student.

View 4 Replies View Related

Queries :: Calculating With Null Fields In A Query

Oct 2, 2014

My training database requires me to identify each training record in the tblEmpTrainHist table as either "Compliant" or "Delinquent". I thought a simple calculation in my query:

RecordStatus: IIF([DateReceived]<=[DateDue],"Compliant","Delinquent")

would do the trick. However, I did not consider the records where the employee has not yet completed the training and the field [DateReceived] is Null. There are two considerations: those employees who have no [DateReceived], but have not yet reached the DateDue (Compliant); and those employees who have exceeded the DateDue (Delinquent).

View 5 Replies View Related

Forms :: Sorting Fields - Syntax Error (Missing Operator) In Query Expression

Sep 16, 2013

I have created a form based on a query. The funny thing is when I tried to sort fields on the form, the following message box pops up:

Syntax Error (Missing Operator) In (Field Name)

I just did the exact same thing several weeks ago, and that first form could sort fields normally. The only difference between the first one and this is that this second query was based on several tables, while the first was based on a single table, although I doubt that is where the problem is.

I forgot to add that I could sort fields where the field name doesn't have spaces in it. For example, the field name "Customer ID" triggers the syntax error, while the field "S/N", "Company", etc. can be sorted like normal.

View 7 Replies View Related

Calculating Number Of Work Dates From 2 Date Fields

May 29, 2005

In my Query I have a Date Received field and a Date Approved field.

I would like to calculate the number of work days, which excludes weekends, between Date Received and Data Approved fields.

It would be more desirable to calculate the number of work days, excluding weekends and governmnet obsereved holidays.. but I don't know if that can be done... If not I can stick with the number of work days excluding weekends.

How would I go about doing this? I would need to add a new column to my query?

What would I put for the field and criteria? What kind of expression do I use?


Any help will be appreciated, thanks

View 14 Replies View Related

Queries :: Calculating Rates Based On Two Fields - Type Conversion Failure

Apr 24, 2013

I have created a make table query and using expressions for two of the fields. I have set the field properties (format) to "Percent". The expressions are calculating rates based on two other fields. The expressions are currently as such:

PTD_CM_PGM_RATE: IIf((IsError([PTD_CM_REPT_PGM]/[PTD_CM_REPT_ER])),"0%",[PTD_CM_REPT_PGM]/[PTD_CM_REPT_ER])

I'm using the IIF function to avoid potential errors should one or both of the values ("PTD_CM_REPT_PGM" or "PTD_CM_REPT_ER") be zero.

However, when running the query, I am getting the "...type conversion failure is caused when the data in one or more fields doesn't match...." error.

View 1 Replies View Related







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