I have a form with a combo that allows me to select nom cc with a view to filtering on that [nom cc], I have a label controlled by two buttons that allow me to set the variance either 0 for exact ie if i select 1.3 then i just want [nom cc] of 1.3 but if i select .1 then I want records with [nom cc] of 1.2, 1.3 and 1.4 ie .1 over and below the selected. If the record has no [nom cc] value then that shown.
Not quite sure how to set the filter for that I have some code I think its a math problem:
Private Sub CBNom_AfterUpdate()Dim StrFilter, StrCBIn As StringStrCBIn = Me.CBNom.ValueStrFilter = "((abs([Nom CC] - " & Me.LblVNomCount.Caption & ")" & ")<=" & Me.LblVNomCount.Caption & ") Or (isnull([nom cc]))"Debug.Print StrFilterMe.Form.Filter = StrFilterMe.Form.FilterOn = TrueMe.Form.RequeryEnd Sub
Open in new window