hi rajeshkatri and to whom who may assist
I have posted my code below for a better understanding. I have tried and change my query several times and below is the most successful one at the moment. but there is one problem, I have to populate the fields on the different section of the Data Report, W/c gives me another error which saids "Report Section does not match data source".
Dim q As Integer
Dim intCtrl As Integer
Dim x As Integer
Dim z As Integer
cn.Open "Provider=MSDATASHAPE; Data Provider=Microsoft.JET.OLEDB.4.0; Data Source=d:\BILLADJ\BillingDB.mdb;"
t = InputBox("test"

With cmd
.ActiveConnection = cn
.CommandType = adCmdText
.CommandText = "SELECT StaffInfo.ID, StaffInfo.name, StaffInfo.team, Details.area, Details.billtrak, Details.disputeref, Details.enduser, Details.custref, Details.acct, Details.servnum, Details.product, Details.billsys, Details.adjdate, Details.auth, Details.moa, Details.typadj, Details.attributed, Details.reason, Details.comment, TBL_Details.tref, TBL_Details.amt_gst_inc, TBL_Details.amt_gst_excl FROM StaffInfo INNER JOIN (TBL_Details INNER JOIN Details ON TBL_Details.billtrak = Details.billtrak) ON StaffInfo.ID = Details.ID WHERE (((Details.billtrak)=[t]));"
.Parameters(0).Value = t
.Execute
End With
With rs
.ActiveConnection = cn
.CursorLocation = adUseClient
.Open cmd
End With
'(Below is just part of the code section to populate the report)
With DataReport2
.Hide
Set .DataSource = rs
.DataMember = ""
With .Sections("Section4"

.Controls
For intCtrl = 1 To .Count
If TypeOf .Item(intCtrl) Is RptTextBox Then
.Item(intCtrl).DataMember = ""
.Item(intCtrl).DataField = rs(z).Name
z = z + 1
End If
Next intCtrl
End With
.Refresh
.Show
End With
Anyone for suggestions? I really need to finish this project and I'm just stuck in here..... help urgent...