Fixed year in Access

G

Guest

I have a file that contains birthdates, but the only information collected is
month & day. It worked ok entering everyone with the current year, until we
added a person who was born on February 29. In order to enter that one, had
to find a leap year. Since we have a report that sorts/totals on the "short
date", it ends up putting that person on a separate page.
Can I either only enter a month and date, or have it automatically enter the
year as 2008 (a leap year)???
What is the easiest solution for this??
 
R

Rick Brandt

Jill said:
I have a file that contains birthdates, but the only information
collected is month & day. It worked ok entering everyone with the
current year, until we added a person who was born on February 29.
In order to enter that one, had to find a leap year. Since we have a
report that sorts/totals on the "short date", it ends up putting that
person on a separate page.
Can I either only enter a month and date, or have it automatically
enter the year as 2008 (a leap year)???
What is the easiest solution for this??

Either enter a complete date or use a text field.
 
A

Albert D.Kallal

I would think the solution in this case is to have a separate field for
birth, and separate field for birth day.
(you could even use two nice combo boxes for the user to make this easy).


It is not clear if you actually have the year (ever), but since it seems
common that you don't have the actual year of birth, then it make no sense
to "store" some birth year, and not know it is correct, or a guess.

For your reports, you then just use a expression in the query builder that
puts the Month + date together, and you can sort/group on your month and
date fields.
 
V

Van T. Dinh

I think Albert recommended (and I agree) that if you don't want to store
birth year, you should use 2 Fields, one for birth month (restricted to
1-12) and one for birth dat (1-31).

You can then place additional limits, (e.g. if birth month is 2, birth day <
30) in the Table validation or code behind your data entry Form.
 
G

Guest

I already have all of the birthdays entered into my database, and would
prefer to have a default year. Since I will not be the end user, it would
provide ease in inputting new members into the file.
Can I define a default year in the table design??
 

Ask a Question

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.

Ask a Question

Top