>Oh, sir Cetin thanks, your codes work fine, I need some guidelines
>
>I want want to validata sno+code then what will be the changes in your codes
>
>select count(*) from subjects where sno=this.value and recno() != m.rec into array x
>
>The grid should accept Following data
>1--VB
>1--VFP
>
>and it should not accept this data
>1--VB
>1--VB
>
>Validation on sno+code
That is not my code. I wouldn't use recno() in an SQL. Probably you are thinking your or someone else's code is mine. What I suggested was:
SELECT COUNT(*) FROM subjects where sno = this.Value into ARRAY cct
With that one it would be:
sno = subjects.sno
code = subjects.code
SELECT COUNT(*) FROM subjects where sno = m.sno and code = m.code into ARRAY cct
Cetin