no sooner is a comparative adverb like better in no better, the expression should be followed by than, not when: No sooner had she come than the maid knocked. I had no sooner left than she called.

...usually is followed by than, as in No sooner had I hung up than the phone rang again, but when can also occur, perhaps mainly in Conversational use, as in No sooner had we decided to compromise when suddenly the argument broke out again. Than is best for Edited English.