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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

list of birthdays



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2004, 04:29 PM
Dan
external usenet poster
 
Posts: n/a
Default list of birthdays

I want to be able to print a list of all of the people in
my database that has a birthday that month. I can find
out who they are by using the vba code:

Me.bday = Format([Date Of Birth], "m") - Format(Date, "m")

It returns 0 then they have birthday that month else they
don't. I can put that on the oncurrent event but I need
to have it so that I have a complete form/report that
just has the people that is having a birthday that month.
Should I use a report and if so what event and how can I
limit it to just the people that is having a birthday.
  #2  
Old July 14th, 2004, 05:16 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default list of birthdays

1. Create a query to use as the source of the report.

2. Type this into the Field row of your query:
Month([Date Of Birth])
and in the Criteria row under this, enter:
Month(Date())

3. In another column of the Field for of the query, enter:
DayOfMonth: Day([Date Of Birth])

When you create your report, you can then sort the entries by entering
DayOfMonth into the Sorting And Grouping dialog (View menu in report design
view).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dan" wrote in message
...
I want to be able to print a list of all of the people in
my database that has a birthday that month. I can find
out who they are by using the vba code:

Me.bday = Format([Date Of Birth], "m") - Format(Date, "m")

It returns 0 then they have birthday that month else they
don't. I can put that on the oncurrent event but I need
to have it so that I have a complete form/report that
just has the people that is having a birthday that month.
Should I use a report and if so what event and how can I
limit it to just the people that is having a birthday.



 




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
outlook 2003 public folders of custom list Lynda Contacts 1 June 9th, 2004 01:25 PM
finding & sorting unqiue names list iwtci Worksheet Functions 6 June 6th, 2004 06:43 AM
How to make list of unique values? JulieD Worksheet Functions 1 February 26th, 2004 12:25 PM
Multiple List function George Worksheet Functions 8 February 15th, 2004 10:13 AM
Question: About using COUNTIF in a filtered list acw Worksheet Functions 1 February 11th, 2004 02:32 AM


All times are GMT +1. The time now is 11:19 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.