I'm using the INSERT INTO statement in Access 2007, but I am getting the error "too few parameters-expected 5". It looks to me like I have 5! Can anyone see the problem?
Private Sub submitButton_Click()
'Insert new record into TBL_Office_Visits
Dim strSQL As String
strSQL = "INSERT INTO TBL_Office_Visits_Students (AutoNumber, Visit_Date, Visit_Time, ReasonForVisit, EmployeeBeingVisited) VALUES " _
& "(Me.AutoNumber.Value, Date, Time, Me.reasonForVisitComboBox.Value, Me.employeeBeingVisitedComboBox.Value)"
CurrentDb.Execute strSQL, dbFailOnError
DoCmd.Close acForm, "FRM_Returning_Student_Detail", acSaveYes
DoCmd.OpenForm "FRM_Thank_You", acNormal