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"
adoJOReport.Refresh

Any help will be greatly appreciated.

To be specific, the error was:

DATAFIELD '(EMPTY)' NOT FOUND

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, networking, learning, and sharing knowledge.