Depends on the school. If you do a search here on the forums or visiting the school sites you can find which schools will/will not accept pre-reqs from a community college.
But yes, there are schools that will not accept any pre-reqs completed at a community college.
Here for example is the pre-reqs for BU dental school:
"Up to 30 credits of community college work will be accepted, but community college coursework may not be applied to science prerequisites (biology, inorganic chemistry, organic chemistry, physics). Science prerequisite courses must be completed at a four-year U.S./Canadian college or university. If you have community college science credits, you should take upper-level courses in the relevant field of study at a four-year institution to earn sufficient prerequisite credits in the topic. It is not necessary to re-take the basic course at a four-year institution if you have advanced coursework in the topic from a four-year institution"