Calculate Age Using Queries
i have a table with fields "[DATE OF BIRTH]", "age", "temp-age"
i have a query that calculate the age:
example; the query will get user to input the "temp-age" and upon "temp-age" is input and "ok" on the query, it will calculate a person's age and store the value inside table "age".
however, the calculated value for the age have some data problem. for example, when a person whose age is yy:mm 24:05 the age inside the table will be 1924:05. there will be a additional "19" at the age.
what cause the additional "19" problem?
---------------------------------------------------------------------
my query in design view is like this; (see attachment)
it uses " [temp-AGE]-[DATE OF BIRTH] " to calculate the age and store into table "age".
View Complete Forum Thread with Replies
Related Forum Messages:
How To Calculate The Fields From Two Queries?
I need to pull 2 fields from 2 different queries, then calculate them. Those 2 queries has the same structure, just one is last year's data, the other is this year's. :rolleyes: I tried using the 3rd queries to combine them, then calculate from there, but then I had no clue where to go from there. I don't sql...I was wondering is there anything to do with sql? :confused: I'm stucked so far, how can I solved it? :mad:
View Replies !
Linking Make-table Queries /append Queries To A BE Database
Hi, I was wondering if anyone has dealt with linking queries to tables in the back end database. I split my database into a FE and BE database in Access (due to size issues). The tables in the FE Database have been linked to the BE Database. However, I would like to link all the make-table queries and append queries in the FE to the tables in the BE using the option 'Make New table'-> Another database(which will be the location of the BE) My question is -can I do this on multiple queries concurrently without having to go to every single query and manually link it to the BE tables. Thanks! rjoe
View Replies !
Update Queries Vs Append Queries, Indexes?
This is a very simple problem most likely for the masses, but I am new to access. I have employees who enter will enter information about specific tests on electronics components into separate tables by a form. I know my method is poor, but this is how it works. I got assigned this database at my internship this summer because they ran out of thigns for me to do.....I've never even used access before, so as long as it works, they're happy. I have a form which which writes to a first table with 20 fields. I then have separate update queries which take the data in the first table and put it in all the other tables. Trust me, i know this is pretty much the opposite of the whole point of a relational database, but I am and was limited by time, for the size of the database they want, there was no time to learn about normalization etc etc. Sorry this is wordy, but THE QUESTION is......if they run multiple tests wtih the same information for some of the fields I have fields named "Run#, Unit#, Date" etc, even if there is records wtih the same information, hwo do i get it all to show. Right now, it seems to be rewriting over the same records. If they run 3 tests on unit 10 on August 1st, how do i get it so all those show up. I think its somethign wtih in the table, for the primary keys, changing the Index: No, Yes(Duplicates) Yes(No Duplicates) but I could be way off. Thanks, if the question doesnt make sense i'll try to rephrase it, I apologize I'm running on about 45 min of sleep:confused:
View Replies !
Parameter Queries Vs Parametrized Queries
I have been asked to set up a parameterized query using 4 fields (ID Number, Surname, Christian Name and Treating Dr/s). When I search Microsoft On-line under parameterized queries it gives a tutorial which basically set out a simple query with "prompt" parameters in the Criteria field. When I search under the Access Help it gives me a totally different explanation - ie. setting up a cross-tab query first and then defining parameters. Is this a loose use of terminology or is there indeed a difference. Help please!
View Replies !
Creating A Form To Get Queries, Run Queries...etc
Hi All, I want to create a form with a Command button, when we click on the command button it needs to bring the Query from a particular mdb, the path for this mdb will vary so we should be able to provide the path info, after bringing the query it needs to be run, how do I do this by just clicking couple of Command buttons? Thanks
View Replies !
Calculate A Value
How would i go about getting the field 'GMargin' (Gross Margin) to be calculated from subtracting 'SellingP' from 'PurchaseP' (Selling and Purchase Prices)? How do i do this? Help me please :)
View Replies !
Calculate
I have a field which I enter a short time such as 3:13, 5:45, etc Now i am creating a report which at the end of the report I would like to include an unbound text box, which displays the total amount of time for that field (pls note that the total will never exceeds 24 hours) What is the best formula to use in order to calculate this ? Cheers
View Replies !
Calculate Hh:mm To Mm
Hello, I am trying to sum minutes from a database using an Access query, but the format in the database is hh:mm. I know the query to use in Oracle: ROUND(SUM((substr(actual_time,1,(instr(actual_time ,':' )-1))) *60 + (substr(actual_time,(instr(actual_time,':' )+1),2))) but not sure of the syntax to use in an Access expression. Any ideas?:confused:
View Replies !
Excel Can´t Calculate.
HI, Excel is having difficulties calculating a workbook of mine. It complains about cirkular references, so I had to set the iterations manually. The workbook holds about 5000 records and I´m using a cosinus function. The thing is I don´t know what to do. Excel calculates the workbook, but it doesn´t do it right. What setting should I use with the iterations? I´m thinking of running it in excel 97. Will that help? I really need to be able to run this workbook. Does anyone have an idea? Fuga.
View Replies !
One PC Not Able To Calculate Formulas Ect.
Hello, I didn’t know how to explain this or where to post this but here we go! I have two databases and one of the PC's here at work can’t use some of the items in the database like on one of the databases there is some formulas in text boxes and that PC won’t calculate what’s needed in them and every PC in the plant will except for this one PC. Also the one PC won’t bring up the Allen Browne's Calendar. When you press the start or end button to bring up the calendar it never pops up but if I enter the start date and end dates and use it that way ect then it works. I have no clue why this is just happening to this one PC. Any ideas?
View Replies !
Date Calculate
I want to calculate a data from anthony table, like (20 Jan 2005) + 365 days will be 20 Jan 2006, how can i do it. The Table setting is just like below: Constituent (DataID,...); Student (DataID, DOB,...); School (DataID, 4YearsOld(As a Date Format),...) Anyone can help me, Thank you.:)
View Replies !
Calculate A % Of Total.
I have a query that returns a number of calls recieved of a certain type for each week of the year. Wnat I want to do is calculate the % of those type of calls of the total calls for each week. Below is my querey SELECT datepart("ww",DateLogged) as Week_Number, COUNT(CallType) AS call_count, FROM tblLog WHERE CallType = 'Software/May-PS' OR CallType = 'Report Regeneration-PS' OR CallType = 'Training/Info-PS' Group By datepart("ww",DateLogged);
View Replies !
Calculate Months
Hello, I'm trying to calculate months not days between EX: 1/1/06 to 6/30/06 I tried to use end date (-) begin date, but is only give me the difference in days. What expression do I use to get 6 months? :confused:
View Replies !
How To Calculate Total?
Hi, i'm trying to calculate the amount of employee for each company giving me a total in the queries.. how do i go about this? I'm not an person who uses Access to solve this. I have amount 20 Companies stored and over 800's employee.. Here are the field in the table:EmployeeIDEmployeeNameNumberofEmployeeThanks! Hope this helps.
View Replies !
Calculate Commissions
Hi I am very new to databases, and think i am a bit over my head. I am doing a database for vacation rentals, and am trying to calculate commissions, basically i wanted to have a set of checkboxes, labeled 10%, 15%, 2.5% and $25, with any combination of these checkboxes being able to be checked. i want the query to work like this: If the 10% checkbox is checked i want the query to take the SubTotal for the reservation, and calculate 10% of that number. if the 2.5% checkbox is also checked, i want the query to calculate 2,5% of the reservation and add it to the commissions total (10% + 15%) I think(hope) that i explained that clearly? Can this be done? Thanks for your help! Ben
View Replies !
Calculate Median
I am attempting to calculate the Average & Median on a particular field in a query. =Median("qry2007_KPI_AvgJan_A","ContractSignedToReceived") query name is qry2007_KPI_AvgJan_A field name is ContractSignedToReceived I am getting #Name? error. Any ideas why? Thanks for any help troubleshooting this.
View Replies !
Calculate Percentage
In a report, I need to calculate the percentage of clients that respond "Yes" to a question on a survey. I need to create a query that will return the count of the number of "Yes" responses, and the number of total responses. For example, if 10 clients complete the survey, and seven respond "Yes", I need the 2 fields in the query to be 7 and 10. So far, I have only been able to do this using multiple queries. Thank you.
View Replies !
Calculate Double OT
stuck in the middle of a project of employee payroll the following problems are for some suggestions: if an employee is not taken off in a week and work on sundays, he's paid double OT; if he is not taken off he's not paid; i.e. he can take 4 days off in a month how can i keep track of this in the db; can i use a table putting 7 days as fields and make it all yes/no so that user can check or uncheck the status against each employee(!); but for whole month how can i calculate work period start from every month on 25th and ends on 24th in next month. got tables for attendance and leave help appreciated
View Replies !
Calculate Value Problem
I cannot figure this out, I have values that need to be calculated in a field but it will not work with null values, I’m sure this is easy but I have not found a solution. Thanks in advance. The attached mdb illustrates my dilemma.
View Replies !
Calculate Fields.
Hi, can someone help me with this formula. i have one field called notice_1 this field is a combo boxs multiple choice ( YES - NO ) Then i have 1 field called score_1 ( if notice_1 = "YES" then let score_1 = 5 else then let score_1 = 10 ) Does this make sense , I am an, amateur at access 2003, Thank You For any help i can get... John Calcitrai
View Replies !
Calculate Stock
Hey Guys. I have a sub form based on an order table. I had another table which lists products which customers can buy. In the products table I have a field named "units on order" which I'd like to update when an order is made in the form and a field named "units in stock" which upon the user opening the order form again and clicking a button to say that particular order has been delievered, the "units in stock field in the products table will had added the quantity chosen in the order form. Any suggestions? Thanks Tempest
View Replies !
Calculate On Form
Hi, I have a from with 3 fields on it where users can enter numbers of boxes attached to a booking. Each field stands for a box of a certain type. E.g.: 20's ==> 1 40's ==> 1 45's ==> 1 Now, I want to calculate a total based on 40 being 1, 20 being 0,5 and 45 being 1,125. The total in this case would be: 2*20 = 0.5 1*40 = 1 1*45 = 1.125 Total: 2.625 Is this possible, and, if yes, how do I insert this calculation? Don't know if this is clear enough, if someone has any questions on my goal here, please ask me to clarify... Thx once more, Lion85heart
View Replies !
|