Hi Tiny,
This error indicates that Access doesn't recognize the two parameters in the Where clause. Are the names of the combo boxes txtName and txtDate? What does txtName contain? Is txtDate a valid Date? Actually I made a mistake and thought that these were text boxes, which is why I recommended that you name them txtName and txtDate. Since they are combo boxes, you might change the names to cboName and cboDate for clarity, but it will work with the existing names. How many columns are in the combo box? If there's more than one, make sure that the bound column contains the Name and Date instead of another field. You can also reference a specific column in a combo box with cboBox.Column(ColNum). Are the field names in the table Name and Date respectively? If you don't see anything obvious based on these questions, set a breakpoint in your VB at strSQL = ... look at the value of txtName, txtDate, and strSQL after the statement executes. I tested this code and know that it works if everything is set up properly.
Just curious...are you displaying all dates in the Date combo box, or only the dates that match the event selected in the first combo box? After you get the Edit working, we can come back to this. I'd probably set it up a little differently. Use a combo box for the Dates. When the user selects a Date, all the events for that date pop up in the Name combo box. When the user selects the Name that they want to edit, the attendance for that event shows up in the Attendance text box (not combo box). You could then have another text box where they enter the new attendance. I would also make the Name combo box invisible until the user selects a date to make sure that they do it in the right order. You could also make the attendance text box invisible until they select a name. Alternatively, you could present the name combo box first, but then it seems like you only need text boxes for the date and attendance.
Let me know how it's going if you get a chance.
Best regards, dz
dzaccess@yahoo.com