G
Guest
I want to select a range of different birthdate in the range of 19 sep to 8
nov this year.
nov this year.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I want to select a range of different birthdate in the range of 19 sep to 8
nov this year.
Dr. Know said:hrnaef said:
I want to select a range of different birthdate in the range of 19 sep to 8
nov this year.
Have you tried a query with
... WHERE [DOB] > #9/18/2005# and [DOB] < #11/9/2005#
?
Dr. Know
I want to select a range of different birthdate in the range of 19 sep to 8
nov this year.
John Vinson said:I want to select a range of different birthdate in the range of 19 sep to 8
nov this year.
You can use a calculated field to get this year's birthday
anniversary:
HappyHappy: DateSerial(Year(Date()), Month([DOB]), Day([DOB]))
Use a criterion on this field of
BETWEEN [Enter start date:] AND [Enter end date:]
to prompt for the desired date range (or, of course, just use the
literal dates):
BETWEEN #9/19# AND #11/8#
John W. Vinson[MVP]
gus said:sorry everyone i'm not very good with computers, but I was wondering if
anyone can tell me how to sort or filter my access client info database to
find all date of births by month.
I entered dob's as 11/9/1968. The sort function sorts by the day (11th)
and
not by the month (9). Can I change its searching capability to get month
of
birth without having to re-entering 4000 new birthdates which would read
9/11/1968.
I just dread the thought of spending 40 hours doing such a thing.
Rather spend it on the kids.
Thanking anyone.
Gus.
Douglas J Steele said:That will give you nothing, since presumably there won't be any records
in
the database where the DOB hasn't yet occurred!
You need to add a computed field to the query that either returns only
the
month and day of birth, or returns when their birthday will occur this
year.
The former is Format([DOB], "mmdd"), the latter is
DateSerial(Year(Date()),
Month([DOB]), Day([DOB]).
If you use the former, the condition would be Between "0919" And "1108".
For
the latter, the condition Dr. Know gave would work.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Dr. Know said:hrnaef said:
I want to select a range of different birthdate in the range of 19 sep
to 8
nov this year.
Have you tried a query with
... WHERE [DOB] > #9/18/2005# and [DOB] < #11/9/2005#
?
Dr. Know
sorry everyone i'm not very good with computers, but I was wondering if
anyone can tell me how to sort or filter my access client info database to
find all date of births by month.
I entered dob's as 11/9/1968. The sort function sorts by the day (11th) and
not by the month (9). Can I change its searching capability to get month of
birth without having to re-entering 4000 new birthdates which would read
9/11/1968.
I just dread the thought of spending 40 hours doing such a thing.
Rather spend it on the kids.
John Vinson said:sorry everyone i'm not very good with computers, but I was wondering if
anyone can tell me how to sort or filter my access client info database to
find all date of births by month.
I entered dob's as 11/9/1968. The sort function sorts by the day (11th) and
not by the month (9). Can I change its searching capability to get month of
birth without having to re-entering 4000 new birthdates which would read
9/11/1968.
I just dread the thought of spending 40 hours doing such a thing.
Rather spend it on the kids.
Jargon alert:
You're making a very common misuse of the word "sort". In database
terms, to Sort means to take a set of records and put them in a
particular sequential order. I think you want to filter or search by
the month.
It's very easy to do so. You can create a Query based on your table
and - if the dob field is actually a Date/Time field, as it should be
- put
BirthMonth: Month([dob])
in a vacant Field cell. This field will contain numbers 1 through 12,
for January through December.
Maybe better: to see all records for birthdates in the upcoming month,
use a different calculated field:
HappyHappy: DateSerial(Year(Date()), Month([DOB]), Day([DOB]))
to get this year's birthday anniversary. Use a criterion
Between Date() AND Date() + 30
to get all birthdays during the next thirty days.
John W. Vinson[MVP]
me again.
thanks for the info. I have spent a couple of hours trying your suggestion.
I can't design my own query so I was using the wizard.
I kept getting regected with error 3075. It said I am getting the field info
wrong.
Should I purchase a book on access?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.