Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the infamous dates

Status
Not open for further replies.

legendv

Technical User
Apr 10, 2002
32
0
0
US
I am entering Dates of birth and if someone is born before 1930 then the date format recognizes it as 2029, i.e...

Birthday Keystrokes Access Reads as
1/1/1930 010130 1/1/1930
1/1/1929 010129 1/1/2029
1/1/1928 010128 1/1/2028

Anyone know of a way to correct this?
 
legendv:

I think the simplest way around this is to require a 4-digit year entry on your form.

HTH,

Vic
 
legendv,
The problem really comes in when you start looking at somebody born (for instance) 2/19/01.

Now, are talking about somebody celebrating their 2nd or 102nd birthday? If we can't even tell, we can't expect a computer to be able to tell either.
 
If you are in XP

control panel

regional & language icon

customize button

date tab

calandar section

bingo...the thing that drives that

AW
 
Korngeek, your response was especially helpful. Thanks for your time to make that post.
 
One thought:

handle the 'lost focus' event of your date field:

Private Sub thedate_LostFocus()
If Year(Me.thedate) > Year(Now) Then
Me.thedate = Month(Me.thedate) & "/" & Day(Me.thedate) & "/" & Year(Me.thedate) - 100
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top