I am using MS Access 2003 and attempting to create a search form. I am a real greenhorn with vba code and so I found code from a book and cd I purchased. I copied the code and attempted to modify it for my needs. However, when I run the code I receive the visual basic error message:
Run-time error '3061 Too few parameters. Expected 1 and I am thrown into debug mode which goes to the following vba code line:
'Open a recordset to see if any rows returned with this filter
Set rst = DBEngine(0)(0).OpenRecordset("SELECT * FROM qryComparablesDrillDown WHERE " & varWhere)
' See if found none
If rst.RecordCount = 0 Then
MsgBox "No Contacts meet your criteria.", vbInformation, gstrAppTitle
'Clean up recordset
rst.Close
Set rst = Nothing
Exit Sub
End If
qryComparablesDrillDown is a query that has no specified parameters to provide, so I am completely stumped. I realize I have not provided enough information to solve the problem, but any advice or clues would be much appreciated.
Thank you in advance.
Run-time error '3061 Too few parameters. Expected 1 and I am thrown into debug mode which goes to the following vba code line:
'Open a recordset to see if any rows returned with this filter
Set rst = DBEngine(0)(0).OpenRecordset("SELECT * FROM qryComparablesDrillDown WHERE " & varWhere)
' See if found none
If rst.RecordCount = 0 Then
MsgBox "No Contacts meet your criteria.", vbInformation, gstrAppTitle
'Clean up recordset
rst.Close
Set rst = Nothing
Exit Sub
End If
qryComparablesDrillDown is a query that has no specified parameters to provide, so I am completely stumped. I realize I have not provided enough information to solve the problem, but any advice or clues would be much appreciated.
Thank you in advance.