For the sake of completeness, here are some further thoughts on the subject:
I suppose that this is the kind of a question which might come up over drinks one evening. So, let's have a look.... The same groups of muscles and reflexes are involved with both coughing and sneezing so, for all practical purposes, you cannot cough and sneeze at the same time. But, these same muscles can increase the intra-abdominal pressure. And that increased pressure could encourage the expulsion of gas per rectum, a fart, if you will. Coughing and sneezing, and even laughing for that matter, could all trigger a generous fart. One would presume that the more vigorous the upper airway activity, the more vibrant the flatulence that would result.