hello dani,

I am using shape sql for datareport without dataenvironment conncetion towards parent-child relation ship table. But doesn't work with error. Because parent fields only accepted in my project. I am attaching my vb 6 project to your kind attention please.

Option Explicit

Dim con As ADODB.Connection
Dim rs As ADODB.Recordset
Dim query As String

Private Sub DataReport_Initialize()

    Set con = New ADODB.Connection
    Set rs = New ADODB.Recordset

    con.CursorLocation = adUseClient

    con.Open ("Provider=MSDataShape;Data Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Student.mdb")

    query = "SHAPE{SELECT * FROM Namelist WHERE (Studentname='" & Form1.Text1.Text & "'" & ")}AS Studentlist APPEND({SELECT * FROM Marklist}AS Marklist RELATE 'Studentname' TO 'Studentname')AS Marklist"

    rs.Open query, con, adOpenForwardOnly

    Set DataReport1.DataSource = rs

    With DataReport1.Sections("Section1")
        .Controls("text1").DataField = "Studentname"
        .Controls("text2").DataField = "Standard"
        .Controls("text3").DataField = "Section"
        .Controls("text4").DataField = "Tamil"
        .Controls("text5").DataField = "English"
        .Controls("text6").DataField = "Maths"
        .Controls("text7").DataField = "Science"
        .Controls("text8").DataField = "Socialscience"
    End With


End Sub

**The error is:

Run-time Error "8526"
DataField 'Tamil' not found.**

This is a shot in the dark, but is it possible there is no field named "Tamil" in NameList?

Thanks for your reply sir, But Marklist table had a Tamilfield. The problem has non acceptable child table.