I have searched the web for a solution to this but nothing has worked for me. I have a form with a list of names in a combo box. I have a subform that is supposed to display all of the jobs that the person has not applied for. The subform is supposed to change when the combo box changes. It does change the first time. It displays the incorrect data, but never changes again. I'm certain the SQL statement is correct because I've run it on its own. Any help is appreciated. Here is the code that is in the After Update event for the combo box.
CmbIndividual.SetFocus
Dim iIndivid As Integer
If IsNull(CmbIndividual.Value) = False Then
iIndivid = CInt(CmbIndividual.Value)
Me.frmJobReqsSubmit.Form.RecordSource = "SELECT * FROM tblJobReqs where ID not in (Select JobReqID from tblIndividualtoJob where IndividualID=" & iIndivid & ")"
Me.frmJobReqsSubmit.Form.Requery
End If
CmbIndividual.SetFocus
Dim iIndivid As Integer
If IsNull(CmbIndividual.Value) = False Then
iIndivid = CInt(CmbIndividual.Value)
Me.frmJobReqsSubmit.Form.RecordSource = "SELECT * FROM tblJobReqs where ID not in (Select JobReqID from tblIndividualtoJob where IndividualID=" & iIndivid & ")"
Me.frmJobReqsSubmit.Form.Requery
End If