DNA elements act across long genomic distances to regulate gene expression in processes including enhancer-promoter interactions and imprinting. During the gene-regulatory phenomenon of transvection in Drosophila, DNA elements on one allele of a gene act between chromosomes to increase or decrease expression of another allele of the gene. Despite the discovery of transvection over 60 years ago, little is known about its biological role. Furthermore, how different cis regulatory DNA elements contribute to the activation or repression of transvection at distinct times during development is unclear. Here, we studied the stochastic expression of spineless (ss) in developing photoreceptors in the fly eye to understand gene activation and repression between chromosomes. We identified a biological role for transvection in regulating expression of naturally occurring ss alleles. We characterized CRISPR-engineered deletions of sequences across the ss locus and identified DNA elements required for activating and repressing transvection. We found that different enhancers participated in transvection at different times during development to promote gene expression and specify cell fates. Bringing a silencer element on a heterologous chromosome into proximity with the ss locus reconstituted the gene, leading to repression. Our studies show that transvection regulates gene expression via distinct DNA elements at specific timepoints in development, with implications for genome organization and architecture.