Ok, so what should be the condition for your ELSEIF branch?
Up to here your logic was
- try and find the data
- if not found select it from somewhere else
- else select from the other place.
If you want to use ELSEIF there needs to be another decision that is made.
- Lars