I am trying to return a Max value from a table to a form. I keep getting the error message "Too few parameters. Expected 1"
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = DBEngine.OpenDatabase("C:\BarCode.mdb")
Set rst = db.OpenRecordset("SELECT Max(Clnid)AS MaxOfClnid FROM Clones WHERE Clnplateid = txtCln_plate_id;")
This function has always worked and I don't know what is going wrong this time.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = DBEngine.OpenDatabase("C:\BarCode.mdb")
Set rst = db.OpenRecordset("SELECT Max(Clnid)AS MaxOfClnid FROM Clones WHERE Clnplateid = txtCln_plate_id;")
This function has always worked and I don't know what is going wrong this time.