E
escudolm
I have been able to figure out a persons age based upon their DOB and a date
of 4/1/2006. I had all the calculations going into textboxs to get the age.
But now I am trying to put it into one line of code. Here is the code I have:
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
had the DOB going into a textbox on frmEntry. Then another textbox converted
it into a datevalue. Once that was done, another textbox did the calculation
to get the age. I am just trying to do it on frmlicense (where it first
goes, in lbldob) instead of doing all that. What am I doing wrong?
of 4/1/2006. I had all the calculations going into textboxs to get the age.
But now I am trying to put it into one line of code. Here is the code I have:
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
had the DOB going into a textbox on frmEntry. Then another textbox converted
it into a datevalue. Once that was done, another textbox did the calculation
to get the age. I am just trying to do it on frmlicense (where it first
goes, in lbldob) instead of doing all that. What am I doing wrong?