A compound of formula (I), a pharmaceutically acceptable salt or solvate thereof, wherein R' represents C,-C6 alkyl,-(CH2)c-[C3-C8 cycloalkyl]-,-(CH2)C-W or-(CH2)C-Z-(CH2)dW; W represents C1-C6 alkyl, C1-C6 alkyloxy,-C02[C1-C6 alkyl],-CONR4R5, an optionally substituted phenyl group, NR4R5, het2 or het3; Z represents O or S(O)g; g represents 0, 1 or 2; R2 represents a phenyl group, optionally fused to a 5-or 6-membered aryl or heterocyclic group which may contain one or more heteroatoms selected from N, O or S; the phenyl group and the optionally fused group being optionally substituted; Ring A represents a 4-, 5-or 6-membered saturated heterocyclic group containing at least one N; Ring B represents a phenyl group or het1, each group being optionally substituted; R7 independently represents H1 C1-C6alkyl, OR3,-(CH2)e-R3 or-(CH2)f-O-(CH2)e-R3; at each occurrence R3 independently represents H1 C1-C6 alkyl optionally substituted by Y,-(CH2)g [C3-C8 cycloalkyl], phenyl, benzyl, pyridyl or pyrimidyl; at each occurrence R4 and R5independently represent H1 Cl-C6 alkyl (optionally substituted with Cl-C6alkyloxy), (CH2)gC02-[C1-C6 alkyl],-S02Me,-(CH2)g[C3-C8 cycloalkyl], S02Me, phenyl, benzyl, pyridyl or pyrimidyl; or R4 and R5 together with the N atom to which they are attached represent a heterocyclic group of from 3 to 8 atoms; Y independently represents a phenyl group, NR4R5 or het4, the phenyl group being optionally substituted; het1 represents a 4-, 5-or 6-membered saturated, or unsaturated, heterocyclic group containing at least one N (but which may also contain one or more O or S atoms); het2 and het4 represent an optionally substituted 4-, 5-, 6-or 7-membered saturated, or unsaturated, heterocyclic group containing at least one N (but which may 5 also contain one or more O or S atoms); het3 represents an optionally substituted 4-, 5-, 6-or 7-membered saturated, or unsaturated, heterocyclic group containing at least one O (but which may also contain one or mare N or S atoms); at each occurrence R6 independently represents H1 C1-C6 alkyl optionally substituted by Y, =(CH2)g [C3-C8 cycloalkyl], phenyl, benzyl, pyridyl or pyrimidyl; a and b independently represent 0 or 1; c,, d, a end g independently represent 0, 1, 2, 3 or 4; . f índeperldently represents 1, 2, 3 or 4; provided that: (i) a + b cannot equal 0; and províded,that,when R1 represents-(CH2)c-Z-(CH2)d-W and W represents.NR4R5 or any N linked heterocyclic, group then d must not be, 0 or 1; and (iii), provided that when R2 represents a phenyl group substituted by a group of, formula-(CH2)eOR3,-(CH2)e-OCOR3 or-(CH2)e,OCOR3 ;or het1,and/or het2 are substituted by a group of formula-(CH2)eOR3, (CH2),-CO2R3 or-(CH2)eOCOR3; or when R7 represents-OR3 or-(CH2)f-0-(CH2)e-R3 and e is 0; or when W represents a phenyl group substituted with-OR3 or-C02R3 and R3 represents an alkyl group substituted with Y, and Y represents NR4R5 or an N-Finked het3; then, R3, must,represent,C2-C6 alkyl substituted with. Y. are useful in the treatment of dysmenorrhoea.