I have created a form, I need this form to enter amounts and date paid after the companies have paid. I have this code that is filtered by company, it shows amount due. I have this code but the form does bot show any data. I need to show data for those companies in arrears.
Code:
Private Sub CboFilter_Change()
'If the combo box is cleared, clear the form filter.
If Nz(Me.CboFilter.Value) = "" Then
Me.Form.Filter = ""
Me.FilterOn = False
' If a combo box item is selected, filter for an exact match.
' Use the ListIndex property to check if the value is an item in the list.
ElseIf Me.CboFilter.ListIndex <> -1 Then
Me.Form.Filter = "[Importer Name] = '" & Nz(Me.Amount_Paid.Value) = "" & _
Replace(Me.CboFilter.Value, "'", "''") & "'"
Me.FilterOn = True
' If a partial value is typed, filter for a partial company name match.
Else
Me.Form.Filter = "[Importer Name] Like '*" & _
Replace(Me.CboFilter.Value, "'", "''") & "*'"
Me.FilterOn = False
End If
' Move the cursor to the end of the combo box.
Me.CboFilter.SetFocus
Me.CboFilter.SelStart = Len(Me.CboFilter.Value)
End Sub