473,414 Members | 1,954 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,414 software developers and data experts.

Function to calculate Age and create a spreadsheet

Hi,

I have a table (Admittance) that has birth dates of all cases admitted, fields being (Case Number and Birth Date). I also have a form that asks the user to select a year and click the 'Find' button to get a list of all the Cases that were 18 yrs old on the year selected.

The way I want to do this is, invoke an event on 'Find' button click that will accept the year selected and looping throught the entire table,
do the following,
format a variable, Entry Date = mm/dd/yyyy, where mm = Month from birth date field, dd = day from birth date field and yyyy = year accepted from the form.
If (Entry Date - Admittance.Birth Date) = 18 yrs move it to a spreadsheet.

End of logic.

Hope I explained the logic properly. In a nutshell I am trying to get all the cases on to a spreadsheet that are 18 yrs old on the year entered by the user.

Please help.


Thanks
Jan 22 '08 #1
2 3361
jaxjagfan
254 Expert 100+
Hi,

I have a table (Admittance) that has birth dates of all cases admitted, fields being (Case Number and Birth Date). I also have a form that asks the user to select a year and click the 'Find' button to get a list of all the Cases that were 18 yrs old on the year selected.

The way I want to do this is, invoke an event on 'Find' button click that will accept the year selected and looping throught the entire table,
do the following,
format a variable, Entry Date = mm/dd/yyyy, where mm = Month from birth date field, dd = day from birth date field and yyyy = year accepted from the form.
If (Entry Date - Admittance.Birth Date) = 18 yrs move it to a spreadsheet.

End of logic.

Hope I explained the logic properly. In a nutshell I am trying to get all the cases on to a spreadsheet that are 18 yrs old on the year entered by the user.

Please help.

Thanks
There wasn't a response to your last post

http://www.thescripts.com/forum/thread760945.html

I had asked what was the format of the Birth Date field. My formula calculated the age as -18.0XXX. for someone you had given a Birthdate of 1918. In order for Access to calc a negative age, Access read the year as 2018. Are the dates in 01/01/18 type format?
Jan 22 '08 #2
There wasn't a response to your last post

http://www.thescripts.com/forum/thread760945.html

I had asked what was the format of the Birth Date field. My formula calculated the age as -18.0XXX. for someone you had given a Birthdate of 1918. In order for Access to calc a negative age, Access read the year as 2018. Are the dates in 01/01/18 type format?

Sorry I didn't see your reply until now.
The date format is 01/01/1918, not 01/01/18.

Thanks
Jan 23 '08 #3

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

Similar topics

8
by: Bill Ehrreich | last post by:
I'm faced with a situation where I will need to calculate a column for a resultset by calling a component written as a VB6 DLL, passing parameters from the resultset to the component and setting...
1
by: beavenour | last post by:
I am looking for some help creating a more universal function out of this lame attempt at javascript. I have little experience with javascript and want to be able to universalize this function. ...
8
by: Penguin | last post by:
We are wondering if there is a way to write a function, or perhaps a class, that can do the following. When you start to type a built-in Access function, when you start to type the function, you...
1
by: Tom | last post by:
Hello, I'm looking for a tool that would allow me to create a web page with the spreadsheet like functionality. Basically, I want to be able to type in a number in the cell and have all totals...
2
by: D. Shane Fowlkes | last post by:
Here's a good one. I've been using an Excel spreadsheet for the past couple of years to calculate a file's Estimated Download Time based off of a solid 50kbs connection (dial up). This is for a...
1
by: Vlad | last post by:
I am trying to decide whether I should buy Visual Basic.NET Standard. I’d like to know the answer to the following questions to help me decide 1. Can I use Visual Basic.NET Standard to create a...
4
by: NormAmst | last post by:
I have a list of CPU processing times and job durations for an entire department at work. There are 3 classifications I am maintaining. CPU time during peak hours , CPU time during non peak hours...
3
by: Libber39 | last post by:
Hi everyone, Have a query on how to calculate the amount of weeks and days contained in a number in an access query. ie: the difference in days between 2 dates amounts to 17 days. I want to now...
9
by: pereges | last post by:
Hello I need some ideas for designing a recursive function for my ray tracing program. The idea behind ray tracing is to follow the electromagnetic rays from the source, as they hit the...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
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...

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.