If that was the case no one would be able to get a mortgage as they'd have a lower credit rating when they actually applied for it formerly than when they got the quote so you'd end up being able to borrow less than they said you could in the first place.
Then you'd need to reapply for the mortgage which drops it further and no one would get a mortgage. It will no doubt be recorded that you asked for a quote, just like it's recorded with anything else credit related.
Also to the best of my knowledge, there is no black mark - it's simply a number which calculates the amount you earn, whether you've been good in the past etc. etc.