=IIF Query

I am trying to us this in an update Access query =IIF(LEN( [PRWBBEPI]![FILE #] =3,"000"& [PRWBBEPI]![FILE #] ,IIF(LEN( [PRWBBEPI]![FILE #] =4,"00"& [PRWBBEPI]![FILE #] ,
IIF(LEN( [PRWBBEPI]![FILE #] =5,"0" & [PRWBBEPI]![FILE #] , [PRWBBEPI]![FILE #])
It keeps telling me wrong # of arguments Can anyone see where I went wrong
Serena2345Asked:
Who is Participating?
 
als315Connect With a Mentor Commented:
You can also use String function and get expected result without IIF:
=String(6-Len([PRWBBEPI]![FILE #]),"0") & [PRWBBEPI]![FILE #]
0
 
Kelvin SparksCommented:
Try this

=IIF(LEN( [PRWBBEPI]![FILE #]) =3,"000"& [PRWBBEPI]![FILE #] ,IIF(LEN( [PRWBBEPI]![FILE #]) =4,"00"& [PRWBBEPI]![FILE #] ,
IIF(LEN( [PRWBBEPI]![FILE #]) =5,"0" & [PRWBBEPI]![FILE #] , [PRWBBEPI]![FILE #])))

Kelvin
0
 
Serena2345Author Commented:
great thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.