Birthday-Age

endri81

Registered User.
Local time
Today, 03:12
Joined
Jul 5, 2010
Messages
121
I have 2 textboxes birthday and age.At the first I enter birthday's for example 28/01/1981 at the second I want to enter a value for example 30 and this age to be saved at birthday field in the table like 01/01/1981.This is in case when for smb is not given the birthday just the age.
How to make this possible because I want these data to be saved in the same field and not to create another column for age.

Regards
 
If you make the Age field unbound, you could have some code in it's After Update event, along the lines of;
Code:
If IsNull(Me.DOB) Then
   Me.DOB = [URL="http://www.techonthenet.com/access/functions/date/dateserial.php"]DateSeria[/URL]l([URL="http://www.techonthenet.com/access/functions/date/dateadd.php"]DatePart[/URL]("yyyy,[URL="http://www.techonthenet.com/access/functions/date/dateadd.php"]DateAdd[/URL]("yyyy", Me.Age * -1, Date())),1,1)
End If
 

Users who are viewing this thread

Back
Top Bottom