Suppose $X$ is an integral noetherian scheme and that $Y$ is a closed integral subscheme with generic point $\eta$. If $U\cap Y\neq\emptyset$ for any affine open $U$, then $\eta\in U$. This follows from the fact that $U\cap Y$ is an affine open subset of $Y$ and $\{\eta\}$ is dense in $Y$.
My question is: Suppose $U$ is an open subset of $X$ (but not necessarily affine) and that $U\cap Y\neq\emptyset$. Let $\operatorname{Spec}A\subset U$ be an open affine. Is it true that $\eta\in \operatorname{Spec} Y$?