473,623 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2003 age query

1 New Member
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 2163
missinglinq
3,532 Recognized Expert Specialist
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
2336
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 on each other in a hierarchical manner. It all works fine in Access, but in the last query (Qrylevel3CostTotals) there's a criteria which I would like to set from an HTML form and thats where I am confused! How do I make this work in an ASP...
11
3750
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 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET actiavted Access 2002 mdb file (and yes, proper rights are set on TMP paths and path,
1
1948
by: Cady Steldyn | last post by:
Example: Date | ItemCode | Stock_In_qty | Stock_Out_qty | Bal_qty ------------------------------------------------------------------ 12/09/2003 | A100 | 20 | 0 | 20 25/10/2003 | A100 | 0 | 10 | *10 I need to query an Access database that will take field 3 (Stock_In_qty) plus any bal from
14
5403
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 7.2 environment, the choices the optimizer makes often seem flaky. But this last example really floored me. I was hoping someone could explain why I get worse response time when the optimizer uses two indexes, than when it uses one. Some context:
23
2682
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 DLookUp("MajorCategory","AutoTypes","='1'") AS MajorCategory, PreOwned.PaintColor FROM PreOwned; When I try to run the above query I get the following error:
1
1606
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 query dynamically. The results of the query are placed into a subform in datasheet view on the same query form. This query works just like it's supposed to on my machine (I'm using Access 2003), but when another user tries to run the exact same...
52
9954
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 2005, and, since he already has licenses for Office Pro 2002, he wants to upgrade to that. I've been saying that we need to upgrade to Access 2003, not 2002, even if Office is kept at 2002. We are also looking to do a fair amount of...
3
3505
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 form has an unbound combo box listing all the meetings in the database allowing the user to navigate between meeting records. The meetings form also has a list box that displays a list of members associated with a meeting.
3
7761
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 appears. It doesn't happen every time, and using the Zoom window works fine. It appears that it only happens when I want to modify an existing expression. This continues to happen even after the database is repaired and reopened. Anyone have any...
3
3846
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 Where clause for a date field. It works fine in Access 2000 and pulls out the appropriate # of records but in Access 2003, this expression (apparently) evaluates differently and no records are extracted. Is this an area that might've changed...
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8471
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6107
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2603
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.