Two generalizations of the Varshamov-Gilbert bound for error-correcting and error-detecting codes are developed. Sufficient intrinsic conditions are given for classes of linear codes over GF

to include "good" codes, and these classes are related to other known classes. A lower bound on the maximal order of subspaces contained in subsets of certain finite vector spaces is given and related to a bound on error-detecting codes.