Text Field IIf Statement

D

dee

I have an employee field that contains a number, but has been set as a text
field as there was no need for calculation.

However, I now have been asked to assign a particular code to the employees
whose numbers are between 1 and 100 and another code if between 101 and 200
and another if between 201 and 300.

Any help would be greatly appreciated!
 
D

dee

Hi there,

Thanks so much for your response. I tried this, but received a type
mismatch error. I must be doing something wrong.
--
Thanks!

Dee


Klatuu said:
IIf([EmpNum] <=100,"A",IIf([EmpNum] <= 200,"B","C"))
--
Dave Hargis, Microsoft Access MVP


dee said:
I have an employee field that contains a number, but has been set as a text
field as there was no need for calculation.

However, I now have been asked to assign a particular code to the employees
whose numbers are between 1 and 100 and another code if between 101 and 200
and another if between 201 and 300.

Any help would be greatly appreciated!
 
R

Ron2006

if [EmpNum] doesn't work try changing each part of that expression
to CInt([EmpNum])

Ron
 
D

dee

Thanks for your response. I tried what you suggested, but get a type
mismatch. I must be doing something wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top