Being the author of the question, you are free to choose whatever answer works for you, as explained in the Help Center:
Accepting an answer [...] simply means that the author received an answer that worked for him or her personally [...].
The chosen answer doesn't have to be the one most upvoted. In fact, there may even be an added value in their choosing an answer that differs from the community's choice (expressed in the form of votes) – particularly if the author explains their choice, which, however, is still not mandatory.
And just as you are free to choose an answer for the first time, you are free to change your choice
…if a newer, better answer comes along later.
Again, this works particularly well for every party involved if the author does indeed decide to follow the new solution rather than just giving in to the indirect pressure of the answer's being heavily voted. (Shouldn't be a problem in this case, though, as ypercube's suggestion is easily superior to the trigger solution.)