What's wrong with the code, pls help:

setCon adoJOReport
adoJOReport.RecordSource = "Shape{Select SUM(Cost) as SC,SUM(Price) as SP,Brand From Temp_JOMaster Where JoNumber='" & txtJO.Text & "'Group by Brand} " _
& "Append ({Select * From Temp_JOMaster " _
& "Where JOnumber='" & txtJO.Text & "'} Relate Brand To Brand) As Command2"

Any help will be greatly appreciated.

To be specific, the error was:


This error occur when I try to open the DataReport
generated by my shape command stated above.

Already solved the problem, ahehe!

It's just that I put report textbox in my DataReport
that is not included in my flooding code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.