Matthew 7:7-11 and Luke 11:9-13 both say about the same thing that if we Ask, Seek, Knock that the Lord will provide.
How do those verses correlate to God saying No when we ask for things?
@Lamb, first, as usual, the context helps us out, at least a little bit:
Mat 7:7 “Ask, and it will be given to you; seek, and you will find; knock, and it will be opened to you.
Mat 7:8 For everyone who asks receives, and the one who seeks finds, and to the one who knocks it will be opened.
Mat 7:9 Or which one of you, if his son asks him for bread, will give him a stone?
Mat 7:10 Or if he asks for a fish, will give him a serpent?
Mat 7:11 If you then, who are evil, know how to give good gifts to your children, how much more will your Father who is in heaven give good things to those who ask him!
Second, our Father will give "good things to those who ask him." Sometimes, we ask for "bad" things from God's viewpoint. I'm convinced that God gives four responses to our prayers, but he always answers them:
1. Yes
2. No
3. Not yet
4. Not the way you expected.
Third, our lives must run on God's time schedule, not the other way around. Sometimes, we think that we're like a dog that wags its owner.
Fourth, Luke's version helps us out even more (Luk 11:13), "If you then, who are evil, know how to give good gifts to your children, how much more will the heavenly Father give the Holy Spirit to those who ask him!” We must make sure that what we are at the center of God's will when we pray according to his will in the Bible. He certainly wants believers to have the Holy Spirit, for example.