The key is not saying "I don't know" and end the conversation. You should give advices on where to find the information needed and who is in a best position to answer.
I've done it plenty of times and my colleagues keep coming back to me when they need help.