I'm trying to get a continuous subform, displaying CourseID and CourseCompletionDate, to display output related to the Employee chosen in through the main subform's combobox (this is an employee training profile showing what the employee's completed training on). Here's my VBA:
Private Sub cboEmployee_AfterUpdate()
On Error GoTo Proc_Error
If IsNull(Me.cboEmployee) Then
Me.subEmployeeCourseTrainingCompletion.EmployeeProfile.Filter = ""
Me.subEmployeeCourseTrainingCompletion.EmployeeProfile.FilterOn = False
Else
Me.subEmployeeCourseTrainingCompletion.EmployeeProfile.Filter = "[EmployeeID]=" & Me.cboEmployee
Me.subEmployeeCourseTrainingCompletion.EmployeeProfile.FilterOn = True
End If
Proc_Exit: Exit Sub Proc_Error: MsgBox "Error " & Err.Number & " in setting subEmployeeCourseTrainingCompletion filter:" & vbCrLf & Err.Description Resume Proc_Exit End Sub
Error that I get when trying to use the combobox on the main subform.
This is driving me bonkers. Why doesn't this want to work when switching employees in the combobox? How can I make this vba and subform work fawlessly with the combobox?