N
nic
Hi There,
I am presently trying to open a query using the DAO
OpenRecordset method which is generating a debug error
saying "Too few parameters expected 2".
the code is provided:
Public Function Develop_missing_form_table()
Dim datab As DAO.Database
Dim rsit As DAO.Recordset
Dim cntr As Long
Dim cntr2 As Long
Dim var_str1 As String
Dim res_str1 As String
Set datab = CurrentDb ' set to the current database
res_str1 = ""
For cntr = 1 To 31
var_str1 = "qry_SUPERVISOR_day" & cntr
Set rsit = datab.OpenRecordset(var_str1,
dbOpenForwardOnly)
res_str1 = rsit.Fields("Field2").Value
If IsNull(res_str1) = True Then
Debug.Print (res_str1)
End If
rsit.Close 'free up the memory
Next cntr
datab.Close 'free up the memory
End Function
Does anybody know how to fix this, I have referenced
queries using this method before yet suddenly now it
doesn't work. Is there another way to do this?
Regards,
-n
I am presently trying to open a query using the DAO
OpenRecordset method which is generating a debug error
saying "Too few parameters expected 2".
the code is provided:
Public Function Develop_missing_form_table()
Dim datab As DAO.Database
Dim rsit As DAO.Recordset
Dim cntr As Long
Dim cntr2 As Long
Dim var_str1 As String
Dim res_str1 As String
Set datab = CurrentDb ' set to the current database
res_str1 = ""
For cntr = 1 To 31
var_str1 = "qry_SUPERVISOR_day" & cntr
Set rsit = datab.OpenRecordset(var_str1,
dbOpenForwardOnly)
res_str1 = rsit.Fields("Field2").Value
If IsNull(res_str1) = True Then
Debug.Print (res_str1)
End If
rsit.Close 'free up the memory
Next cntr
datab.Close 'free up the memory
End Function
Does anybody know how to fix this, I have referenced
queries using this method before yet suddenly now it
doesn't work. Is there another way to do this?
Regards,
-n