I am trying to read in a query file so I can do some work on each record (different work for each trans type) but I can't get to that point at the moment because I keep getting the above error.
I have checked all the fields in the query and they are the same name as on the table. The query that is being read is the result of a previous query that had external criteria).
The code is
Dim strQryFile As String
Dim strQryFileSql As String
Dim db As Database ' Should this line be Queries ??
Dim RecCounter As Integer
strQryFile = "DdSelectTransIntQry"
Dim rs As DAO.Recordset
Dim lUserID As Long
DBEngine.SetOption dbMaxLocksPerFile, 1000000
On Error GoTo ErrTrap
TaskCompletedFld = 0
Me.QryFile = strQryFile
lUserID = Me.UserIdFld.Value
Set db = CurrentDb
strQryFileSql = "SELECT * FROM " & Me.QryFile & ";"
All of the above variables have been declared properly
Any help would be most appreciated
I have checked all the fields in the query and they are the same name as on the table. The query that is being read is the result of a previous query that had external criteria).
The code is
Dim strQryFile As String
Dim strQryFileSql As String
Dim db As Database ' Should this line be Queries ??
Dim RecCounter As Integer
strQryFile = "DdSelectTransIntQry"
Dim rs As DAO.Recordset
Dim lUserID As Long
DBEngine.SetOption dbMaxLocksPerFile, 1000000
On Error GoTo ErrTrap
TaskCompletedFld = 0
Me.QryFile = strQryFile
lUserID = Me.UserIdFld.Value
Set db = CurrentDb
strQryFileSql = "SELECT * FROM " & Me.QryFile & ";"
All of the above variables have been declared properly
Any help would be most appreciated