Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 20th, 2005, 09:13 PM
Registered User
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query birthdate by month

Hi everybody i'm new to this forum. I'm John and I would like to ask for the opinion of the experts in this forum regarding my problem in VB6 when querying in ACCESS for birthdays by month, its seems that my query is working but it [u]does not display everybody</u> in the list.
Are there more accurate way to query?

Field: Birthday
DataType: Date/Time

Condition: WHERE BasicInfo.Birthdate LIKE '" & txtMonth.Text & "/##/####" & "'"

Old February 20th, 2005, 11:49 PM
Friend of Wrox
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts

If you want to get birthdays in a particular month, then u can use the following:

WHERE month(BasicInfo.Birthdate ) = " & txtMonth.Text

Om Prakash
Old February 23rd, 2005, 01:23 AM
Registered User
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

thanks a lot! I works fine now. I'm still testing it.

Similar Threads
Thread Thread Starter Forum Replies Last Post
sql query to generate counts by month lethe SQL Server 2000 10 December 23rd, 2017 05:33 AM
Calculate age from a varchar birthdate field nuttylife2 SQL Server 2000 15 April 18th, 2016 10:56 AM
Converting month name to month number kalyanykk SQL Server 2005 7 August 19th, 2008 10:37 PM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM
get current month cathiec SQL Language 2 February 23rd, 2006 09:58 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.