By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,094 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

how to write the condition

P: 1
Hi,

I am new to access and learning. Can you see how I can make this check without giving me #error when running it. It will value it as #error on the report.
Expand|Select|Wrap|Line Numbers
  1.  
  2. =IIf((InStr(1,[Sig_Aux_Info],"ICU ")>0) Or (InStr(1,GetSigAuxDrugCode([ITN],[PMP],"DRUGCODE_INFO"),"MSG QUALIFY")>0 And Trim([IV_METHOD_CODE])="10") Or (InStr(1,GetSigAuxDrugCode([ITN],[PMP],"DRUGCODE_INFO"),"MSG QUALIFY")>0 And Trim([NRS_STATION])="PSYH" And Trim([PHM_ORDERS!LATIN_DIR_ABBR])="REPLACE"),"Can't reorder on this form","____________ | ____________")

Expand|Select|Wrap|Line Numbers
  1.  Trim([NRS_STATION])="PSYH"  
I would like to check more stations to include SICU, MICU, etc. When I added those in as
Expand|Select|Wrap|Line Numbers
  1.  Trim([NRS_STATION])=("PSYH" or "SICU" or "MICU")
after running the report, the field value as #error.

Thanks
Feb 12 '07 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Try this ...

Expand|Select|Wrap|Line Numbers
  1.  
  2. =IIf((InStr(1,[Sig_Aux_Info],"ICU ")>0) 
  3. Or (InStr(1,GetSigAuxDrugCode([ITN],[PMP],"DRUGCODE_INFO"),"MSG QUALIFY")>0 
  4. And Trim([IV_METHOD_CODE])="10") 
  5. Or (InStr(1,GetSigAuxDrugCode([ITN],[PMP],"DRUGCODE_INFO"),"MSG QUALIFY")>0 
  6. And Trim([NRS_STATION]) IN ("PSYH","SICU","MICU")
  7. And Trim([PHM_ORDERS!LATIN_DIR_ABBR])="REPLACE"),
  8. "Can't reorder on this form",
  9. "____________ | ____________")
  10.  
Mary
Feb 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.