Finding Birthdays For The Next Week Using DateOfBirth
Nov 14, 2005
The title tells it all really. I need a way to take a list of records with the field D.o.B in short format e.g. 12/10/1990 and be able to find out who's birthday it will be in the next week. I cant find a way to take the date of birth and search it to find, say the week starting 11/10 and get the dates the next week (so up to 18/10) because of the date of birth not being the current date.
sorry I'm not good at explaining things :o . I'm trying to say getting 12/10/2005 as the date of birth would be no problem as it would fall into the week choosen but 12/10/1990 is not the right year so doesnt appear but I want it to. so I need it to only search for the 12/10 part not the year so I can get the birthdays but I dont know how to achieve this. I'm not sure its possible but I'll probably be told its quite easy.
Typically I want the query to ask the start date of the week that the user enters, and it will find all birthdays from that date to the date 7 days on. although asking for the start date and then what date do I want to stop searching for birthdays (i.e. 'enter first date: 12/10' and 'enter second date: 30/12' then find the birthdays inbetween the dates) would probably be more practical and flexible for future use. I'm not paticularly good with ms access and although looking and searching I cant see a way to achieve this but I cant believe its not possible so any help would be appreciated very much. thanks in advanced if you help me out at all
thanks for reading
View Replies
ADVERTISEMENT
Mar 24, 2015
So I found this video (youtube.com/watch?v=FTjyuSTcTII&spfreload=10) and followed it to do a query for all upcoming birthdays. The video shows how to do it for the next two months and I tried to modify it just for the next 7 days. When I tried to run it, I got "Date type mismatch in criteria expression" error. I tried putting it back in the criteria she had, but still got the same thing.
At 6:53 you can find the code she used for the first table (basically asking when their next birthday is) and at 9:57 is the code for the criteria. Below is my modification.
Between Date() And DateAdd("d",7,Date())
View 14 Replies
View Related
Dec 28, 2007
I have a query that extracts the month and day of a bowlers birthday for a selected week and year (Done from a form).
The query below works fine until the end of the year when the ScheduleDate crossover to a new year. At that point the query wants to include all of the bowlers birthdays even though I'm only trying to get the month/Day Between 12/31/07 and 01/06/08.
What am i doing wrong?
Hope I'm clear enough!
SELECT tblBowlers.FirstName, tblBowlers.LastName, tblBowlers.BirthDay, Format(DateDiff("yyyy",[BirthDay],[ScheduleDate]),"#") AS BowlerAge, tblSchedules.SeasonID, tblSeasons.Quit
FROM tblSchedules, tblTeams INNER JOIN (tblBowlers INNER JOIN tblSeasons ON tblBowlers.BowlerID = tblSeasons.BowlerID) ON tblTeams.TeamID = tblSeasons.TeamID
GROUP BY tblBowlers.FirstName, tblBowlers.LastName, tblBowlers.BirthDay, tblSchedules.SeasonID, tblSeasons.Quit, tblSchedules.ScheduleDate, tblSchedules.WeekNo
HAVING (((tblBowlers.FirstName)<>"DUMMY") AND ((tblBowlers.LastName)<>"DUMMY") AND ((tblSchedules.SeasonID)=[Forms]![frmYearSelect].[SeasonYearID]) AND ((tblSeasons.Quit)=False) AND ((tblSchedules.WeekNo)=[Forms]![frmWeekSelectExcel].[txtNextWeek]) AND ((Format([BirthDay],"mm/dd")) Between Format([ScheduleDate]-2,"mm/dd") And Format([ScheduleDate]+4,"mm/dd")));
View 1 Replies
View Related
Sep 28, 2015
I came up with the following string to do this but I keep getting an error...
Next_months_Birthday: DateSerial(Year(Date())+IIf(Format(Date()),"mmdd") >Format([Month],"00") & Format([Day],"00"),1,0),[Month],[Day])
The error I get is ....The expression you entered contains invalid syntax, or you need to enclose your text data in quotes.
I attached a screen shot ....
View 8 Replies
View Related
Jun 18, 2013
I need to create a guest database for a small hotel. And I would like to create a pop-up alert that appears when I open MS Access to remind me birthdays of the guests.
View 1 Replies
View Related
Feb 11, 2015
I've created a report based on a query that shows me the jobs that have been added to tblJobs between two selected dates.
The report works fine and displays all the information I need, however other than being sorted by day of the week i.e. Monday, Tuesday, Wednesday etc. The records just run on one after another.
I want to create a page break, so that a full week is shown on a single page before then forcing a new page when it moves in to the next week.
View 8 Replies
View Related
Nov 6, 2006
I have a query that groups records by date into week numbers using the following expression.
WeekNumber: DatePart("ww",[Date],2)
I would prefer to display the result as the week commencing Monday date.
How?
View 13 Replies
View Related
Mar 18, 2006
I have the following expression which works nicely to group all of my dates into their respective weeks of the year, by week dates beginning Mondays:
WeekStart: ([MyDateField]+1)-DatePart("w",[MyDateField],2)
However, since the week beginning 12/26/05 crosses over both '05 and '06 (as week 53 and week 1), I get two groups of dates recorded for the week of 12/26/05 when I run my query.
Since my chart is based on weekly totals, I can't have two separate totals with the same 'week beginning' date.
How can I adjust my code to get one total group of dates for the week of 12/26/05?
Help greatly-needed!....
View 1 Replies
View Related
May 29, 2005
What I would like to do is get a count of the product sold and view it over a ten week period in this case week one starts 26th June.
Wk1, Wk2, Wk3 ....
x 10 5 15 etc
y 20 4 12
in the format above but I am not sure how to achieve this, I have the following:
SELECT COURSEBK.[COURSE-DSName], COURSEBK.From, COURSEBK.Description, Count(COURSEBK.[COURSE-DSName]) AS [CountOfCOURSE-DSName]
FROM COURSEBK
GROUP BY COURSEBK.[COURSE-DSName], COURSEBK.From, COURSEBK.Description
HAVING (((COURSEBK.From)>=#6/26/2005# And (COURSEBK.From)<=DateAdd("ww",+10,"26/06/05")))
ORDER BY COURSEBK.From;
(the above is working despite access changing the date format between the hashes)
regards in advance foir guidance
View 5 Replies
View Related
Jan 23, 2006
How do you convert an inputted date to a week number in a query please.
Thanks in advance. :)
View 9 Replies
View Related
Jun 26, 2006
I have a table that has a start day and end day. I would like to get a total for all events occuring on the days of the week (mon, tues, etc.). The problem I am having is when the start day and end day are not the same I need to count that event for all the days in between also.
Example
(Start Day)/(End Day)
(Sat 1/1/2005)/(Sat 1/1/2005)
(Sat 1/1/2005)/(Sun 1/2/2005)
(Sat 1/1/2005)/(Sat 1/8/2005)
(Sun 1/2/2005)/(Mon 1/3/2005)
(Mon 1/3/2005)/(Mon 1/17/2005)
(Thurs 1/6/2005)/(Mon 1/10/2005)
(Thurs 1/6/2005)/(Thurs 1/6/2005)
Results:
Day/num events
Sun/5
Mon/3
Tue/2
Wed/2
Thu/4
Fri/3
Sat/5
Any help you can provide would be greatly appreciated.
View 4 Replies
View Related
Jul 20, 2006
Does anyone know a query expression that would always return the date of the first day of the week (a Monday) for the week after next?:confused:
View 2 Replies
View Related
Oct 2, 2006
Hi, I am doing a project at school and need to run a query that displays everyone that has a date of birth within 7 days using a date in the format 01/01/2001. I really have no idea how to do this and would really appreciate any help.
Thank you very much
Kris
View 2 Replies
View Related
May 2, 2007
i would like to querry a date which only showing work week and year... i try in FORMAT([MYDATE], 'WW YYYY', 1, 2)... it work but when go to 31/12/2006 it showing "01 2006"... but suppose it should show "01 2007" how can i overcome this?
View 2 Replies
View Related
Aug 17, 2005
I have a "To Do" form that I've created using various DataAdd code to advance DueDates annually, monthly, weekly, etc.
Problem is I have a task that is due the second Monday of every month. I've been using If Statements but can't seem to get this to work since the second Monday isn't a even number. It could be different depending on how many days of the month there is.
Thanks,
ChiefRetired
View 1 Replies
View Related
Apr 2, 2005
I am new to Access and I am trying to use a chart in a report to display the injuries by day of week. Sunday thru Saturday. I am using a qry to pull the information from a tbl that we have entered the information into. I would like to use a Column Chart.
The problem is that it will display the day of week alphabetically and not Sunday -Saturday. I would also like the chart to display each day even thou there were no injuries for that specific day.
Any help would be greatly appreciated.
View 1 Replies
View Related
Jul 30, 2007
I am currently using the calendar provided in Access 2003 in my project. Is there a way to define the first day of the week for the calendar using codes. Any help would be greatly appreciated.
View 2 Replies
View Related
Jun 2, 2005
I have table that is used to collect roster information the date field is formatted dddd/dd/mm/yyyy a second field requires the end user to insert W to designate the entry as a weekend date. The end user's often forget to insert the W (not functional) I need a way to code the field to look @ date field and update itself with a W if [DateField] is a weekend date.
A query calculates the roster hours and * the hours field by 1.5 if the W is true. The query works fine, I just want to automate the "W"
Weekday Fn perhaps? Help anybody???
View 2 Replies
View Related
Aug 8, 2005
Hi,
I'm looking for a module wich converts a date to a week.
Ex: i type 08/02/2005 and i obtain Week #2
(Some years have 52 and other 53 weeks, depend on the date of the 1st week of the year, an other problem is that some people say the week begins the monday, other say it begins a sunday)
Maybe a built in fonction exists.
Thanks in advance for help.
VINCENT
View 9 Replies
View Related
Nov 14, 2005
Hi
I have a client whose working week runs from 0700h on Monday. They do a lot of overnight stuff and so have this cutoff. I am doing a time sheet db for them. All the time sheet records have a starting date and time, and an ending date and time. The end date defaults to the start date but can be updated if an overnight shift. I separated the date and time since I remember issues using the general date format.
I am puzzling over how best to organise my queries so that I can pull up weekly reports that tie in with their week criteria.
Do I build my own table with the date for Mondays over the next few years or is there some smarter way to identify Mondays and then say I want everything between 0700h on that Monday and 0659h the following Monday?
Any thoughts or pointers would be most appreciated.
Thanks and best wishes
View 2 Replies
View Related
Mar 3, 2006
I need a formula that will return the nth full week of the month that specified date falls in.
Example:
03/31/2006 would be "5" - the fifth full week of March
20/13/2006 would be "2 - the second full week of February
I've tried using a formula that subtracts the week number for the 1st of the month from the week number the date falls into, but it's just not working as I expect it to.
format([ETA],"ww",1) - format(date(format([ETA],"m",1) & "/01/" & format([ETA],"yy",1),"ww",1)
View 3 Replies
View Related
Oct 29, 2006
Hi,
I will really appreciate ur help. I work on Access-2000 database and have a problem. I need to get the number of the week. So i used the funktion as a standard value as following:
"=((Monat(Datum())*30,5-Tag(31-Datum()))/7)"
It shows me for today 39 instead of 44.
Could u please help me and tell me why this funktion doesnt work?
Thanks in advance
View 5 Replies
View Related
Sep 6, 2007
I am trying to generate a Query by week always beginning on a Monday. I pick any date....and want all records in both printed version and chart version i,e, number of safety meetings attended vs number who should have attended for this week. I can enter data with todays date, well any day this week. Then at some future date ask for who attended this week and percentages (another story). Any ideas?
Nav4
View 1 Replies
View Related
Jan 18, 2006
I have a large report that runs a six weeks average based on the last six weeks of production. Our fiscal year starts November 28th and our weeks starts on Monday.
I have used the following format to start the week on Monday
Week1: (DatePart("ww",[EntryDate],2))
To set up the fiscal year I used the following format in my query.
FiscalYear: IIf(Format([EntryDate],"mmdd")>"1127",DatePart("yyyy",[EntryDate])+1,DatePart("yyyy",[EntryDate])) . The criteria is 2006
I have a Weekending table that I have all the weeks listed including the weeks in calendar 2005 that are included in our fiscal 2006 that I have linked to my query.
When I run the report, it will not include weekending 1/1/06 (Week 1). It is totally eliminated. There is probably a conflict in the above formats, but I am not knowledgable enough in Access to figure it out. I have been searching this site without success. I would appreciate any help I can get. Last week I had to do the reports manually because I couldn't get the works to run right.
Thanks,
View 1 Replies
View Related
Feb 16, 2006
Want to use criteria in a date field to query data a week at a time. Open the query and have it ask for week starting MM/DD.
Date input will normally use the Monday of each week and expect data back for Monday through Sunday
View 1 Replies
View Related
Nov 4, 2006
Hi I am looking for a formula for my query which filters out only the orders raised in the current week.(5day week Monday to Friday) I did not want to enter dates manualy.
Can this be done ?
Can anyone help me with this.
Tks
View 3 Replies
View Related