Results 1 to 6 of 6
  1. #1
    gstylianou is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2013
    Posts
    167

    Query about to find which customers have birthday today

    I greet all,




    I would appreciate if anyone can help me with the query which I want to create about finding the date of birth of the customer.


    I explain:


    I have a table (tblCustomers) which among others contains the field "DateOfBirth". I would like to create a query so that looking into tblCustomer about the dates where the month and day of birth of the client is the same as the Date () so that I know every day which customers have birthdays.


    Thank you in advance

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Here is one way. In your query, create a calculated field which return the Month and Day of your Birth date, something like:
    Expr1: Format([Birth],"mmdd")
    Then, in the Criteria row under this calculated field, enter:
    Format(Date(),"mmdd")
    Then the query will only return people whose birthday is today.

    Note: If you de-select the "Show" box under this calculated field, it will not show the calculation in the fields it returns (if you do not wish to see that).

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    assuming your DOB field doesn't include any time element... then in a query of tblCustomers you should be able to put the criteria in the DOB field as: Date()

    give it a try and see if that works

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    assuming your DOB field doesn't include any time element... then in a query of tblCustomers you should be able to put the criteria in the DOB field as: Date()

    give it a try and see if that works
    That would only work if they were born today, not if they have a birthday today! (all date fields have a year component to them).

  5. #5
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    ahh...brain freeze on my part......

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    ahh...brain freeze on my part......
    We've all had those! Blame it on the early morning!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 04-17-2014, 11:08 AM
  2. Replies: 3
    Last Post: 09-24-2013, 07:33 AM
  3. Replies: 5
    Last Post: 10-12-2012, 11:00 AM
  4. Replies: 1
    Last Post: 01-27-2012, 02:03 PM
  5. Customers unsold this month Query
    By Rpuzwebb in forum Queries
    Replies: 3
    Last Post: 01-23-2011, 10:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums