473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access 2003 age query

1
In Access 2003 under Windows XP

I have made a database for the local Legacy group and they require reports on Widows of various ages.

I have their age calculated and shown in form view, however this number is not transfered back to the table. It is shown as 0.

As Query requires the age taken from the table I cannot get the Widows List for eg aged between 60 and 75

Is there any way of getting the age displayed in the table so that it can be used in the Query, or another way of getting the list for use in a Report

Jorgo
Nov 24 '07 #1
1 2155
missinglinq
3,532 Expert 2GB
I'm not really sure exactly how you are set up, as you speak of tables and queries and forms, but not how they're realted in your database. Your form, even if based on only a single table, should really be based on a query based on the table! They are so many things you can do with queries that you can't do with tables. Making a table from a single table is as easy as using the Query Wizard.

Then in the Query Desing View, you can place a calculated field to give you the Widows' ages. In an empty field in the grid, in the name box type in:

Expand|Select|Wrap|Line Numbers
  1.  TrueAge: DateDiff("yyyy",[DOB],Date())-IIf(Format$(Date(),"mmdd")<Format$([DOB],"mmdd"),1,0)
where DOB is the field holding the date of birth. You can now base your form on this Query, as well as any Reports you need, using your new calculated field, TrueAge, just as you would any other field.

If you calculated an age in the form, and then stored it in a table field, the age stored would only be valid until the Widow's next bithday. If you calculate it in this manner, anytime you use the Query for a Form or Report the ages will always be up to date.

Welcome to TheScripts!

Linq ;0)>
Nov 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Marco Alting | last post by:
Hi, I'm still confused about my queries, I want to do something is ASP that is easily done in Access. I'll post the Access queries below as a reference. The main idea is that the queries depend...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
1
by: Cady Steldyn | last post by:
Example: Date | ItemCode | Stock_In_qty | Stock_Out_qty | Bal_qty ------------------------------------------------------------------ 12/09/2003 | A100 | 20 | 0 ...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
23
by: JustMe | last post by:
I don't know if this has anything to do with AccessXP running on Terminal Services with Access97/2000 also installed, but here is one example of a query that does not work any longer: SELECT...
1
by: paul.hanti | last post by:
I've built a shared database that sits on shared network drive using Access 2003 (Access 2000 file format). I've also built a simple query form that uses unbound textbox controls to build the...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
3
by: rhobson2 | last post by:
Hello, I wrote a database applicaiton using Access XP (2002) and everything has been working good for the client until they purchased a couple of new computers with Access 2003. The meetings...
3
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
3
by: Sheldon | last post by:
I have the following query expression - Like Format((!!)) & "/*/" & (! !) which would translate to e.g. 04/*/2007 if someone is running a report for last month. The above expression is part of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.