Sorry People !
I'm back with now something which I thought was going to be easy:
(1) I have consolidated my IFRS Trial Balance after conversion to our functional currency using union queries and before applying some domain functions, If I apply sum and Group BY function within the query it takes something like 45 minutes to compile a report, hence the need to change everything to open record set, but unfortunately my report even if it now takes 5 seconds to come out, it's just brought errors. See the screen shoot + the final query + record set.
Actual select query being opened as record set see below:
Below is my open record set with parameters embedded in the individual MS Access queries which you cannot see but are required to filter the Trial Balance:
I'm back with now something which I thought was going to be easy:
(1) I have consolidated my IFRS Trial Balance after conversion to our functional currency using union queries and before applying some domain functions, If I apply sum and Group BY function within the query it takes something like 45 minutes to compile a report, hence the need to change everything to open record set, but unfortunately my report even if it now takes 5 seconds to come out, it's just brought errors. See the screen shoot + the final query + record set.
Actual select query being opened as record set see below:
Code:
SELECT QryTBFinalBranch.AccountCode, QryTBFinalBranch.AccountName, QryTBFinalBranch.Debit, QryTBFinalBranch.Credit, QryTBFinalBranch.GrandTotal
FROM QryTBFinalBranch;
Below is my open record set with parameters embedded in the individual MS Access queries which you cannot see but are required to filter the Trial Balance:
Code:
Dim db As DAO.Database
Dim strSql As String
Dim prm As DAO.Parameter
Set db = CurrentDb
strSql = "SELECT [QryTBMonthly].[AccountCode],[QryTBMonthly].[AccountName],Sum([QryTBMonthly].[Debit]) As TDebits,Sum([QryTBMonthly].[Credit]) As TCredits,Sum(GrandTotal) As FinTotal FROM [QryTBMonthly] GROUP BY [QryTBMonthly].[AccountCode],[QryTBMonthly].[AccountName]"
With db.CreateQueryDef("", strSql)
For Each prm In .Parameters
prm.value = Eval(prm.Name)
Next
With .OpenRecordset(dbOpenSnapshot, dbSeeChanges)
If Not .EOF() Then
Me.RevenueAccount = .Fields(0).value
Me.RevAcc = .Fields(1).value
Me.Debit = .Fields(2).value
Me.Credit = .Fields(3).value
Me.GrandTotal = .Fields(4).value
End If
End With
End With
Set prm = Nothing
Set db = Nothing