Private Sub ClearAgeGroupCache()
Clear the AgeGroup cache. Use this after editing.
Person Name and Age Manipulation
Clear the AgeGroup cache. Use this after editing.
Provides flexible formatting of title and first, middle and surnames.
Use a format string with the following values: t / T - Title (upper or lower case) f / F - First Name (upper or lower case) s / S - Surname (upper or lower case) m / M - Middle Name (upper or lower case)
Get age as specified date given date of birth.
This is not as easy as it might seem: DateDiff("y", DOB, Date) does not work Returns Null if the DOB cannot be converted to a valid date.
Get age group as specified in table lk_AgeGroup (which may be customised by the user). The table values are read once and then cached for the lifetime of the application. The makes the lookup very fast.
Returns an AgeGroup_ID from the table. -10 is the fixed 'Unknown' group.
Get age as specified date given date of birth.
This is not as easy as it might seem: DateDiff("y", DOB, Date) does not work. GetAgeInt is used in recordsets like this: Age: IIf(IsNull(DOB), Null, GetAgeInt(DOB)) as the variant-returning GetAge function gets cast to a string if there are any nulls in the column, which causes DataLists to sort age using string order rather then integer. This strong-type-returning function will not be cast to a string.
Returns -1 if the DOB cannot be converted to a valid date.
Get the first word from a string of multiple word separated by spaces.
Get the last word from a string of multiple word separated by spaces.