Amen and Amen to what AbideinHim said. I quote again that whole post:
"The only way to come before a holy God in prayer is to come on the basis of the blood of Jesus that has been shed for us. The blood of Jesus gives us access to the throne of grace. The Word of God tells us that we can come boldly unto the throne of grace because of what Jesus has done for us.
We can never enter in to God's presence based on what we have done. Even if we have read the Word of God and done many good works, our righteousness will not be sufficient to come before a holy God. Neither does our unrighteousness disqualify us from prayer, because we have an advocate before the Father, Jesus Christ the righteous, and if we confess our sins, He is faithful and just to forgive us and to cleanse us from all unrighteousness. Through faith in Jesus Christ we are made righteous through the blood, and through the blood, we can come boldly to the throne of grace in prayer.
"For we do not have a high priest who is unable to sympathize with our weaknesses, but we have one who was tempted in every way that we are, yet was without sin. Let us then approach the throne of grace with confidence, so that we may receive mercy and find grace to help us in our time of need." (Hebrews 4:15,16)
"Therefore, brothers and sisters, since we have confidence to enter the Most Holy Place by the blood of Jesus," (Hebrews 10:19).