hello all
i am having diffculty opening a recordset i generated from calculated query results. the code that appears below compiles, but when i try to run it, or open the form that it is it attached to, i get an error that says that one of the fields in the query cannot be found. the field both exists and is spelled correctly, which the error box asks me to check....the missing field is used in the join clause of the query code. the error may be there, but i cant catch it.
i am baffled. if someone can help, i would be very thankful.
Option Compare Database
Option Explicit
Dim dbCurrent As Database
Dim rsTemp As Recordset
Dim strSQL As String
Private Sub Form_Load()
Set dbCurrent = CurrentDb
strSQL = "SELECT AmtPaid FROM payfwdcalc;"
Set rsTemp = dbCurrent.OpenRecordset(strSQL)
With rsTemp
End With
End Sub
SELECT DISTINCT [Claimants Table].[Social Security #], [Claims Table].[Claim Number], [Payments Table].FeeSchedule, [Payments Table_1].Deductible, copaycalc.CoPayment, (([Payments Table].[FeeSchedule])-([Payments Table_1].[Deductible]))-(copaycalc.CoPayment) AS AmountPaid
FROM (([Claims Table] INNER JOIN [Claimants Table] ON [Claims Table].[Claim Number] = [Claimants Table].[Claim Number]) INNER JOIN ([Payments Table] INNER JOIN [Payments Table] AS [Payments Table_1] ON [Payments Table].FeeSchedule = [Payments Table_1].FeeSchedule) ON [Claims Table].[Claim Number] = [Payments Table].ClaimNumber) INNER JOIN copaycalc ON [Payments Table_1].FeeSchedule = copaycalc.FeeSchedule
GROUP BY [Claimants Table].[Social Security #], [Claims Table].[Claim Number], [Payments Table].FeeSchedule, [Payments Table_1].Deductible, copaycalc.CoPayment;
happy weeknd all!
aperture
i am having diffculty opening a recordset i generated from calculated query results. the code that appears below compiles, but when i try to run it, or open the form that it is it attached to, i get an error that says that one of the fields in the query cannot be found. the field both exists and is spelled correctly, which the error box asks me to check....the missing field is used in the join clause of the query code. the error may be there, but i cant catch it.
i am baffled. if someone can help, i would be very thankful.
Option Compare Database
Option Explicit
Dim dbCurrent As Database
Dim rsTemp As Recordset
Dim strSQL As String
Private Sub Form_Load()
Set dbCurrent = CurrentDb
strSQL = "SELECT AmtPaid FROM payfwdcalc;"
Set rsTemp = dbCurrent.OpenRecordset(strSQL)
With rsTemp
End With
End Sub
SELECT DISTINCT [Claimants Table].[Social Security #], [Claims Table].[Claim Number], [Payments Table].FeeSchedule, [Payments Table_1].Deductible, copaycalc.CoPayment, (([Payments Table].[FeeSchedule])-([Payments Table_1].[Deductible]))-(copaycalc.CoPayment) AS AmountPaid
FROM (([Claims Table] INNER JOIN [Claimants Table] ON [Claims Table].[Claim Number] = [Claimants Table].[Claim Number]) INNER JOIN ([Payments Table] INNER JOIN [Payments Table] AS [Payments Table_1] ON [Payments Table].FeeSchedule = [Payments Table_1].FeeSchedule) ON [Claims Table].[Claim Number] = [Payments Table].ClaimNumber) INNER JOIN copaycalc ON [Payments Table_1].FeeSchedule = copaycalc.FeeSchedule
GROUP BY [Claimants Table].[Social Security #], [Claims Table].[Claim Number], [Payments Table].FeeSchedule, [Payments Table_1].Deductible, copaycalc.CoPayment;
happy weeknd all!
aperture