Question: I have two accepted papers X and Y. I listed X as a reference for Y. I used "To appear" in front of X in the reference section of Y. But it has not published yet. How can I add volume details of X, while it seems that X will be published after publishing Y?

Answer: 
I think it is possible under one of the following options:

1. If possible and allowed by the publisher, you publish a preprint of X (e.g. arXiv or PubMed) and you cite the preprint (which is a very common practice nowadays). When X will be published by the publisher, most of the bibliographic indices/platforms will link it to its preprint and make two versions of the same paper.
2. You cite X without mentioning the volume and page range, which is also normal and common. There is no standard rule telling authors how to cite and up to my knowledge, no publisher has specific requirements on how to cite. E.g. for the sake of space, I abreviate journals and conferences' names.

Please refer also to [I have two papers in an up-coming conference. Is it appropriate to cite one in another?](https://academia.stackexchange.com/questions/8443/i-have-two-papers-in-an-up-coming-conference-is-it-appropriate-to-cite-one-in-a) and [How could two papers which were both published in the same year and same conference cite each other?](https://www.quora.com/How-could-two-papers-which-were-both-published-in-the-same-year-and-same-conference-cite-each-other)
I don’t know what your field is. I did my PhD in Molecular Biophysics ten years ago. It was customary to just list your paper X as “in press” and the corresponding journal name, if it’s cited in your paper Y reference.