Can someone give some advice? I am not big on VB scripts, so am trying to write an expression in an update query that is designed to populate a field which I will use as the email first letter. If the rank is SC then the prefix is "s", if the rank is "Admin" etc through to "SRO2 then the prefix is "c" otherwise the rank is a police officer and the prefix is "p". The letters s or c or p are entered into the field indicated in the query.
The expression reads
IIf([Workers]![Rank]="SC","s",II f([Workers]![Rank]="ADMIN" Or "AGENCY" Or "ANALYST" Or "CIV" Or "PHOTOG" Or "SCENE EX" Or "OTHER" Or "CIV SUPV" Or "Cadet" Or "Comms" Or "PCSO" Or "TraffW" Or "SRO","c"," p"))
but it doesn't want to work.
Could someone either tell me what is wrong with the expression, or show me a VB alternative that I can use to update all records?
Many thanks,
B
The expression reads
IIf([Workers]![Rank]="SC","s",II f([Workers]![Rank]="ADMIN" Or "AGENCY" Or "ANALYST" Or "CIV" Or "PHOTOG" Or "SCENE EX" Or "OTHER" Or "CIV SUPV" Or "Cadet" Or "Comms" Or "PCSO" Or "TraffW" Or "SRO","c"," p"))
but it doesn't want to work.
Could someone either tell me what is wrong with the expression, or show me a VB alternative that I can use to update all records?
Many thanks,
B
Comment