This code is driving me absolutely wild! I cannot for the life of me figure out why I keep erroring out. Whenever I run the code I receive a "Too Few Parameters. Expected 1." Run-time error. What am I doing wrong here? The query is based upon a text box on a form. When the user enters a value into the text box the query displays the results. I have verified there are records in the query by opening the query. However, when I run the code it does not work...
Code:
Private Sub cmdRunFunction_Click()
Dim db As DAO.Database, RS As DAO.Recordset
Set db = CurrentDb
DAO.DBEngine.SetOption dbMaxLocksPerFile, 40000
Set RS = db.OpenRecordset("qryProc_00", DB_OPEN_DYNASET)
RS.MoveFirst
MsgBox RS, vbOKOnly
End Sub
Thank you in advance!