G
Guest
I have been able to get the persons age based upon their DOB and the date
4/1/2006. I did all the calculations in different textbocs but I am trying
to do it in one line of code. Their DOB is on frmlicense in lbldob. I am
trying to move it over onto frmEntry in txtage. Here is the code on
frmlicense:
Forms!frmEntry!txtage = Int(DateDiff("m", (DateValue(Mid$([lbldob], 5, 2) &
"/" & Right([lbldob], 2) & "/" & Left([lbldob], 4))), #4/1/2006#) / 12)
It tells me object does not support this property or method. Originally, I
transfered the DOB onto a textbox in frmEntry, then had another textbox turn
it into a datevalue. Then once the datevalue was gotten it got put into a
textbox, which did the calculation for the age. It worked that way just
fine, but I wanted to put it into just one line of code. What did I do wrong?
4/1/2006. I did all the calculations in different textbocs but I am trying
to do it in one line of code. Their DOB is on frmlicense in lbldob. I am
trying to move it over onto frmEntry in txtage. Here is the code on
frmlicense:
Forms!frmEntry!txtage = Int(DateDiff("m", (DateValue(Mid$([lbldob], 5, 2) &
"/" & Right([lbldob], 2) & "/" & Left([lbldob], 4))), #4/1/2006#) / 12)
It tells me object does not support this property or method. Originally, I
transfered the DOB onto a textbox in frmEntry, then had another textbox turn
it into a datevalue. Then once the datevalue was gotten it got put into a
textbox, which did the calculation for the age. It worked that way just
fine, but I wanted to put it into just one line of code. What did I do wrong?