Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateAdd help please

Status
Not open for further replies.

ankat

Technical User
Nov 7, 2002
4
0
0
AU
I am looking for a criteria expression using access that lists all peoples names (from my surname field) if they have a upcoming birthday during next month (from my birthdate field).The table containing the surname field and birthdate field is called client information.
Any help would be greatly appreciated
WHERE ((((([Client Infomation]![Birthdate]="& Month(DateAdd("m",1,Date())) & ";"
Will this work?
Where do refer to the Surname field in this expression.
I keep getting invalid syntax message
 
This should do it:

select surname, birthdate from myTable where datePart("m",birthDate) = datePart("m",dateAdd("m",1,date()))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top