I'm a definite beginner here, so please excuse me if this has a simple answer.
BACKSTORY
I work for a nonprofit and we are working to automate the gift acknowledgement process. I currently geta file that comes from the Oracle database where we record all of our gifts. The file is imported into Access 2003 and we run a variety of functions from the raw data -- one of the newer desires is to run actual letters. The letters are setup such that the report looks for the letter code in the query and then through a simple IIf statement displays the appropriate text for that letter code. The problem is in the salutation line of the letter (Dear Mr. Doe, where "Mr. Doe" is the field [FORMAL_SALUTATION]). There are 6 salutation fields that come on the Oracle download file -- formal, informal, combined, etc. that may or may not be populated.
DESIRED OUTCOME
I am trying to get the report to look for and display the "best" salutation based on what is available. So if there is data in the [COMBINED_INFORMAL_SALUTATION] field like "Jane and John," I'd want Access to pull that instead of [COMBINED_FORMAL_SALUTATION] -- "Mr. and Mrs. Doe" In other words, informal salutations sit higher on the heirarchy.
SO...
Is there a way to rank fields so that the report pulls only the top ranking populated field? I tried nesting IIf(IsNull statements, but the expression was getting ridiculously long and didn't even work correctly.
Am I trying to swim upstream here or is there some kind of answer?? Thanks to anyone who can help!