I have a list box that I want to populate once a ComboBox is changed. Below is the code I am using but it won't work or throw an error message.
Any idea what I may be doing wrong?
Any idea what I may be doing wrong?
Code:
Private Sub All_Cmb_Group_Change()
All_List_Not_Worked.RowSource = "SELECT [Self Pay AP].[MEDICAL RECORD], Sum([Self Pay AP].[Current Inv Balance]) AS [SumOfCurrent Inv Balance]" & _
"FROM [Self Pay AP]" & _
"WHERE ((([Self Pay AP].[MEDICAL RECORD]) ='" & [Forms]![FrmMain]![All_txt_Mrn_Search] & "')" & " And " & "(([Self Pay AP].GROUP) ='" & [Forms]![FrmMain]![All_Cmb_Group] & "'))" & " Or " & "((([Self Pay AP].GROUP) ='" & [Forms]![FrmMain]![All_Cmb_Group] & "'))" & _
"GROUP BY [Self Pay AP].[MEDICAL RECORD], [Self Pay AP].[Date Worked]" & _
"HAVING ((([Self Pay AP].[Date Worked]) Is Null Or ([Self Pay AP].[Date Worked]) Is Null))" & _
"ORDER BY Sum([Self Pay AP].[Current Inv Balance]) DESC;"
All_List_Not_Worked.Requery
End Sub