Concatenate IIF statements in the expression builder

I have two fields that I am extracting data off from. One static field called DBID which always returns "30FSE". I have another field called Job which returns 3 types of values either "30-05-0001", "30-10-0002" or "30-99-0003". The logic is that I would like to say if the DBID = 30FSE then AG & if JOB like *05* then B or if JOB like *10* then C & right(JOB,3). Concatenation is needed. The result from one record whose DBID is 30FSE and JOB is 30-05-0001 would return this result AGB001.  The result from one record whose DBID is 30FSE and JOB is 30-10-0002 would return this result AGCB002. Can I do something like this in the expression builder of an access query? I have so far: Job Code: IIF([DBID] = "30FSE",[AG]) I cant figure out how to concatenate the other statements.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimCotteeHead of Software ServicesCommented:
Hi carlosm06,

iif([DBID]="30FSE","AG","") & Iif([Job] Like "*-05-*","B",iif([Job] Like "*-10-*","C","D")) & Right([Job],3)

Should do it. Assuming that if you have a job like "30-xx-xxxx" where the xx is not 05 or 10 then you get a D instead of the B/C

Tim Cottee

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tim, why did u put dashes in the wildcards check, do u really need them?
I would of thought it would just be   Like "*05*"    and Like "*10*"

carlosm06Author Commented:
You're a genious Tim!
ah, dont worry. Ive just seen the sample data, I missed that the 1st read

TimCotteeHead of Software ServicesCommented:

I put them in because I guess there is a possibility that one of the job numbers could match either 05 or 10 in some other part of the string. E.g., "30-99-0005" which would match on 05 but not on -05-.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.