I know this may sound crazy but when a dishwasher sets for awhile or even when using it soap scum can build up in the drain for this problem you can take about 1 CUP of clorox and pour it in the bottom of the dishwasher and let it set for an hour or two then run it through a cycle also check the air cap and lines leading from it to be sure they are not stopped up also if you have a disposal in place check the inlet line from the air cap take the line off and make sure it is not clogged up
Hope this helps have a nice day