Dear SI,

Kindly see this thread

My code is as follows

Code:
Dim StrSQL As String
Dim AdoCommand As ADODB.Command
Set AdoCommand = New ADODB.Command
StrSQL = "SELECT tblExp.TrDate, mstcenter.centername, tblExp.InternalTransport, tblExp.PartyTransport, tblExp.TotTransport, tblExp.Electricity, tblExp.DieselOil, tblExp.FirewoodBoiler, tblExp.Chemicals, tblExp.RepairMaint, tblExp.WaterExp, tblExp.TotDirectExpenses, tblExp.VehicleDieExp, tblExp.TravellingExp, tblExp.SalaryExp, tblExp.BankChargesExp, tblExp.OfficeExp, tblExp.PostagePhoneExp, tblExp.MisExp, tblExp.MarkeExp, tblExp.DonetionExp, tblExp.PrintingStaExp, tblExp.TotInDirectExp, tblExp.TotExp FROM MstCenter INNER JOIN tblExp ON MstCenter.centerid=tblExp.CenterId;Values (?,?)"

With AdoCommand
            .ActiveConnection = CN
            .CommandType = adCmdText
            .CommandText = StrSQL
            .Prepared = True
            .Parameters.Append .CreateParameter(, adDate, adParamOutput, , DTTransaction.Value)
            .Parameters.Append .CreateParameter(, adInteger, adParamOutput, , Text1.Text)
            .Execute , , adCmdText + adExecuteNoRecords
End With
I just need to Fetch record.

Thanks for Early reply.