I am currently trying to write a simple function in MS-Access 2003 using IIF and a few other functions (LEN and LEFT). However, I get the #Error in the required fields. Please, find below the function I wrote. I will greatly appreciate your assistance -
Unique_ID: IIf(Len([Airline Activity - Detail - Jan]![Middlename_IA]=1),Left([Airline Activity - Detail - Jan]![Firstname_IA],2) & [Airline Activity - Detail - Jan]![Lastname_IA],Left([Airline Activity - Detail - Jan]![Firstname_IA],2) & [Airline Activity - Detail - Jan]![Middlename_IA])
Unique_ID: IIf(Len([Airline Activity - Detail - Jan]![Middlename_IA]=1),Left([Airline Activity - Detail - Jan]![Firstname_IA],2) & [Airline Activity - Detail - Jan]![Lastname_IA],Left([Airline Activity - Detail - Jan]![Firstname_IA],2) & [Airline Activity - Detail - Jan]![Middlename_IA])