This paper outlines a method for constructing self-orthogonal codes from orbit matrices of strongly regular graphs admitting an automorphism group G which acts with orbits of length w, where w divides |G|. We apply this method to construct self-orthogonal codes from orbit matrices of the strongly regular graphs with at most 40 vertices. In particular, we construct codes from adjacency or orbit matrices of graphs with parameters (36,15,6,6), (36,14,4,6), (35,16,6,8) and their complements, and from the graphs with parameters (40, 12, 2, 4) and their complements. That completes the classification of self-orthogonal codes spanned by the adjacency matrices or orbit matrices of the strongly regular graphs with at most 40 vertices. Furthermore, we construct ternary codes of 2- (27,9,4) designs obtained as residual designs of the symmetric (40, 13, 4) designs (complementary designs of the symmetric (40,27,18) designs), and their ternary hulls. Some of the obtained codes are optimal, and some are best known for the given length and dimension.2010 Mathematics Subject Classification: Primary: 05E30, 94B05; Secondary: 05B05, 20D45.