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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

view birthdate based on age



 
 
Thread Tools Display Modes
  #1  
Old September 28th, 2009, 09:50 PM posted to microsoft.public.access.reports
BVM
external usenet poster
 
Posts: 10
Default view birthdate based on age

Hi! I have a report set up that prints ID cards for me, but I only need the
birthdate to appear if the person is under 24. Right now I have the birthdate
in a field and I can't figure out which code to use instead. Can someone help
me out with this? Thanks!

BVM
  #2  
Old September 28th, 2009, 10:53 PM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default view birthdate based on age

On Mon, 28 Sep 2009 13:50:01 -0700, BVM wrote:

Hi! I have a report set up that prints ID cards for me, but I only need the
birthdate to appear if the person is under 24. Right now I have the birthdate
in a field and I can't figure out which code to use instead. Can someone help
me out with this? Thanks!

BVM


Use an unbound control, not the [DOB] control:
=IIf(DateDiff("yyyy",[DOB],Date())24,[DOB],"")

Make sure the name of this control is not "DOB".
Change DOB to whatever the actual name of the Birthdate field is.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old September 29th, 2009, 12:44 AM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default view birthdate based on age

It sounds like you are saying that you want to see DOB if age is 24. That
sounds like something you could do in the query you use to 'feed' your
report...

Regards

Jeff Boyce
Microsoft Office/Access MVP


"BVM" wrote in message
...
Hi! I have a report set up that prints ID cards for me, but I only need
the
birthdate to appear if the person is under 24. Right now I have the
birthdate
in a field and I can't figure out which code to use instead. Can someone
help
me out with this? Thanks!

BVM



  #4  
Old October 3rd, 2009, 08:22 PM posted to microsoft.public.access.reports
BVM
external usenet poster
 
Posts: 10
Default view birthdate based on age

Thanks so much! I was only able to work on the dbase until today, but it
worked perfectly.

"fredg" wrote:

On Mon, 28 Sep 2009 13:50:01 -0700, BVM wrote:

Hi! I have a report set up that prints ID cards for me, but I only need the
birthdate to appear if the person is under 24. Right now I have the birthdate
in a field and I can't figure out which code to use instead. Can someone help
me out with this? Thanks!

BVM


Use an unbound control, not the [DOB] control:
=IIf(DateDiff("yyyy",[DOB],Date())24,[DOB],"")

Make sure the name of this control is not "DOB".
Change DOB to whatever the actual name of the Birthdate field is.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 




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


All times are GMT +1. The time now is 12:56 AM.


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