>>>I have used this code but it was not giving the desired result.
You have not replied to my question is the connection between the two tables the roll field?
What redult are you getting.
>Thanks for your guidance. But My problem is quite different:
>
>In a form I shall enter a name. If the entered name is exists in the student table,
> records from two tables will be obtained corresting to the entered name.
>I have used this code but it was not giving the desired result.
>
>
>use student
>locate for name=lcName
>if found()
>select pupil.*,name from pupil,student where pupil.roll = student.roll and pupil.name=lcName into cursor myresult
>else
>
wait window
>endif
>
>
>
>
>
>In this case How I shall proceed ?