ddskorupski
Registered User.
- Local time
- Today, 13:32
- Joined
- Apr 29, 2009
- Messages
- 44
ok. I need serious help here. I use Access 2007. I have what I thought should not be a complex query but I cannot get the query right. I have searched this forum for answers on select case and switch and honestly have no clue how to do this. here is what I need to happen
not correct syntax...just so you get the gist)
IIF([derived_bu]="Primary Care" or "VR (Vaccines Research)", AND IIF ([real_work_flag]="Y", AND IIF ([Study_critical]="Y", 1,2,IIF([derived_bu]="specialty Care", AND IF ([level assignment]=1a or Reg or Viiv,1, IIF(derived_bu]="specialty care" AND IF ([level assignment]= 2a or Ph4, 2, else null
so anything that is primary care or vaccines research and has a flag of y for real work flag and study critical it sould return 1
all other bu's are 2 except for
specialty care: which if the level assignment is 1a, reg or viiv it shoud return 1 unless the level assignments are 2a and ph4..it will return 2. all other specialty cares should be blank
Can someone please help me figure out how to get this to work?

IIF([derived_bu]="Primary Care" or "VR (Vaccines Research)", AND IIF ([real_work_flag]="Y", AND IIF ([Study_critical]="Y", 1,2,IIF([derived_bu]="specialty Care", AND IF ([level assignment]=1a or Reg or Viiv,1, IIF(derived_bu]="specialty care" AND IF ([level assignment]= 2a or Ph4, 2, else null
so anything that is primary care or vaccines research and has a flag of y for real work flag and study critical it sould return 1
all other bu's are 2 except for
specialty care: which if the level assignment is 1a, reg or viiv it shoud return 1 unless the level assignments are 2a and ph4..it will return 2. all other specialty cares should be blank
Can someone please help me figure out how to get this to work?