A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculating Ages



 
 
Thread Tools Display Modes
  #1  
Old August 17th, 2004, 03:51 PM
Graham
external usenet poster
 
Posts: n/a
Default Calculating Ages

Have been following recent thread on calculating ages. I have a Club
membership list, including a D.O.B. field. I wish to calculate the current
ages of the membership on a monthly basis, preferably to YY/MM/DD accuracy,
though YY/MM would suffice. I followed through to saving module, which I
believe I will have to edit (?), but got lost at the "Control Source" stage.
I found the field properties OK, but where do you find the "Control Source"
????
Many Thanks
  #2  
Old August 17th, 2004, 04:22 PM
fredg
external usenet poster
 
Posts: n/a
Default

On Tue, 17 Aug 2004 07:51:01 -0700, Graham wrote:

Have been following recent thread on calculating ages. I have a Club
membership list, including a D.O.B. field. I wish to calculate the current
ages of the membership on a monthly basis, preferably to YY/MM/DD accuracy,
though YY/MM would suffice. I followed through to saving module, which I
believe I will have to edit (?), but got lost at the "Control Source" stage.
I found the field properties OK, but where do you find the "Control Source"
????
Many Thanks



I have no idea what you have done up to this point.
There is no need for a module to do this,
So, let's start again.

If you wish to get a list of members ages, you can do it in a query or
on a form, or in a report.

In a query, include the members ID, Members Name, [DOB], etc., fields.
Then add a new column.
Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd")
Format(Date(), "mmdd"), 1, 0)

If you wish to do this in a report instead, add an unbound text
control to the report. As the control source of this control, write:

=DateDiff("yyyy",[DOB],Date())-IIf(Format([DOB],"mmdd")Format(Date(),
"mmdd"),1,0)

You can find the control source property of any control by
right-clicking on the control (in design view) and then selecting
Properties. Click on the Data tab and the Control Source is the first
line. Type the above directly on that line, (including the = sign).

You do know, I hope, that this Age computation should NOT be stored in
any table.
Just compute it and display it on a form or report, as needed.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ages of participants Desmond Running & Setting Up Queries 1 July 14th, 2004 11:51 PM
Need to Calculate Employee Ages Motra Worksheet Functions 3 June 4th, 2004 04:26 PM
Calculating ages Jay Jay Worksheet Functions 5 January 26th, 2004 02:19 AM
Calculating Ages Worksheet Functions 2 November 5th, 2003 09:28 AM


All times are GMT +1. The time now is 05:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.