From a Friend:
It seems like I’m beginning to do more programming in Access than I anticipated, but if you can help me with an IF statement, I’d appreciate it…perhaps you’ll have a better way of doing this.
Anyway, I created a field called “infection” and I want to take all the records from a field called specimen_sources, but I want infection to either say “blood” or “other”. For instance if specimen_source is null I want it to say “other”, if it says blood, I want it to say “blood”, or if it says skin or any other thing else I want it to say “other”. Does that make sense?
Here’s the code:
IIf([Specimen_Source] Like "blood", "blood") Or IIf([Specimen_Source]<>"blood", "other") Or IIf([Specimen_Source] Is Null, "other")
This retrieves only records that either say blood or other—about 272 rows where I should have over 3,000.
Any help you can provide will certainly be helpful.
Thanks in advance (for my friend)
Visit me at
It seems like I’m beginning to do more programming in Access than I anticipated, but if you can help me with an IF statement, I’d appreciate it…perhaps you’ll have a better way of doing this.
Anyway, I created a field called “infection” and I want to take all the records from a field called specimen_sources, but I want infection to either say “blood” or “other”. For instance if specimen_source is null I want it to say “other”, if it says blood, I want it to say “blood”, or if it says skin or any other thing else I want it to say “other”. Does that make sense?
Here’s the code:
IIf([Specimen_Source] Like "blood", "blood") Or IIf([Specimen_Source]<>"blood", "other") Or IIf([Specimen_Source] Is Null, "other")
This retrieves only records that either say blood or other—about 272 rows where I should have over 3,000.
Any help you can provide will certainly be helpful.
Thanks in advance (for my friend)
Visit me at