G
Guest
here is my code to open the recordset based on table and query
Dim dbCalc As Databas
Dim rstCalc As Recordse
Dim rstResult As Recordse
Dim strFilter As Strin
Set dbCalc = CurrentD
Set rstResult = dbCalc.OpenRecordset("DVIEW_POTENTIAL") 'it works fin
If strFilter = "" the
Set rstCalc = dbCalc.OpenRecordset("Q_Potential_Well_Calc") 'didn't works
els
Set rstCalc = dbCalc.OpenRecordset("Select * from Q_Potential_Well_Calc " &
" WHERE " & strFilter) 'didn't work
Endi
DVIEW_POTENTIAL is back end table link to current databas
Q_Potential_Well_Calc is query from several linked tabl
Can anybody explain me why it always failed when tried to open recordset based on query with error message
Run-time error '3061'
Too few parameters. Expected 2
Any help would be very appreciate
Gabriel
Dim dbCalc As Databas
Dim rstCalc As Recordse
Dim rstResult As Recordse
Dim strFilter As Strin
Set dbCalc = CurrentD
Set rstResult = dbCalc.OpenRecordset("DVIEW_POTENTIAL") 'it works fin
If strFilter = "" the
Set rstCalc = dbCalc.OpenRecordset("Q_Potential_Well_Calc") 'didn't works
els
Set rstCalc = dbCalc.OpenRecordset("Select * from Q_Potential_Well_Calc " &
" WHERE " & strFilter) 'didn't work
Endi
DVIEW_POTENTIAL is back end table link to current databas
Q_Potential_Well_Calc is query from several linked tabl
Can anybody explain me why it always failed when tried to open recordset based on query with error message
Run-time error '3061'
Too few parameters. Expected 2
Any help would be very appreciate
Gabriel