This paper includes a preparation of a number of heterogeneous ring compounds through a three-component reaction methods. The work started with the synthesis of derivatives 1,2,3,4-tetrahydropyrimidine-5-carboxylate [K1-K6] through the reaction of three substances together and at the same time; ethyl acetoacetate, urea, thiourea and benzaldehyde substitutes. Then synthesis of substituted 1,2,3,4-tetrahydropyrimidine-5-carboxylic acid compounds [K7-K12] through the aqueous base hydrolysis reaction of the compounds [K1-K6] with 5% KOH aqueous solution following by neutralize the product with HCl solution. The synthesized compounds were identified by spectral methods: UV, FT-IR and H1- NMR beside melting point and the purity was determined by using (TLC). Some of these compounds are tested against four strains of bacteria (P. aeruginosa and S. aurous).