O
OEB
I am getting a runtime error:
Dim qdfAction As DAO.QueryDef
Dim prmCurr As DAO.Parameter
Set qdfAction = CurrentDb.QueryDefs("qryAppendRTEHistory")
For Each prmCurr In qdfAction.Parameters
prmCurr.value = Eval(prmCurr.Name)
If prmCurr.Name = "[Enter Division: Retail-1, Institutional-2,
Corporate-3]" Then
prmCurr.value = [Forms].[RTEsbyRTE].[Division]
End If
Next prmCurr
qdfAction.Execute dbFailOnError
What's wrong with this code, specifically the if statement? When I debug
the prmCurr.Name was equal the string.
Dim qdfAction As DAO.QueryDef
Dim prmCurr As DAO.Parameter
Set qdfAction = CurrentDb.QueryDefs("qryAppendRTEHistory")
For Each prmCurr In qdfAction.Parameters
prmCurr.value = Eval(prmCurr.Name)
If prmCurr.Name = "[Enter Division: Retail-1, Institutional-2,
Corporate-3]" Then
prmCurr.value = [Forms].[RTEsbyRTE].[Division]
End If
Next prmCurr
qdfAction.Execute dbFailOnError
What's wrong with this code, specifically the if statement? When I debug
the prmCurr.Name was equal the string.