G
Guest
I am trying to decifer how long a client has been using our services. I have a calculation in our form, but I am slowly converting my forms from table driven to query driven so that ages and service lengths will always be accurate
Dim BaseMonths As Intege
Dim EmpYears As Intege
Dim EmpMonths As Intege
Dim LengthHolder As Strin
BaseMonths = DateDiff("m", Me.Svc_Start, Date
EmpYears = BaseMonths \ 1
EmpMonths = BaseMonths Mod 1
Select Case EmpYear
Case
LengthHolder = "
Case
LengthHolder = "1 yr
Case Els
LengthHolder = EmpYears & " yrs
End Selec
LengthHolder = LengthHolder & EmpMonth
Select Case EmpMonth
Case Is <
LengthHolder = LengthHolder & " mo
Case Els
LengthHolder = LengthHolder & " mos
End Selec
Me.Svc_Length = LengthHolde
This is the code behind the event on my form but it doesn't work in the report that I am setting up. ???????
I also tried
=DateDiff("yyyy", [Birthdate], Now())+ Int( Format(now(), "mmdd") < Format( [Birthdate], "mmdd")
But that only yields years and I would like the year, mo format
Bail me out again Pretty Please !
Dim BaseMonths As Intege
Dim EmpYears As Intege
Dim EmpMonths As Intege
Dim LengthHolder As Strin
BaseMonths = DateDiff("m", Me.Svc_Start, Date
EmpYears = BaseMonths \ 1
EmpMonths = BaseMonths Mod 1
Select Case EmpYear
Case
LengthHolder = "
Case
LengthHolder = "1 yr
Case Els
LengthHolder = EmpYears & " yrs
End Selec
LengthHolder = LengthHolder & EmpMonth
Select Case EmpMonth
Case Is <
LengthHolder = LengthHolder & " mo
Case Els
LengthHolder = LengthHolder & " mos
End Selec
Me.Svc_Length = LengthHolde
This is the code behind the event on my form but it doesn't work in the report that I am setting up. ???????
I also tried
=DateDiff("yyyy", [Birthdate], Now())+ Int( Format(now(), "mmdd") < Format( [Birthdate], "mmdd")
But that only yields years and I would like the year, mo format
Bail me out again Pretty Please !