okay, almost there - here's what i have in window_activated:
and the function:Code:If accesslevel = True Or canseeall = True Then cbCompanyName.Items.Filter = Nothing Else cbCompanyName.Items.Filter = New Predicate(Of Object)(AddressOf FilterCompanies) End If
i'm erroring out on "currentitem is not declared and a second error of of type 'companyname' is not defined.Code:Public Function FilterCompanies(ByVal item As Object) As Boolean If DirectCast(CurrentItem, CompanyName).Territory = territory Then Return True Else Return False End If End Function
The combobox is databound, and is displaying the company name field and that table also has a field in it called territory - the public variable territory is what i am trying to filter the table on against the territory field in the table......




Reply With Quote