BindingSource.Filter help

Nessie

Member
Joined
Oct 14, 2011
Messages
20
Programming Experience
1-3
Hi All,

Been trying to use the BindingSource.Filter on my program and everytime I fire it nothing is happening i.e. the text boxes I have setup and are not populated even though I can navigate through all the records inthe dataset using the respective navigation buttons...

Code..

Private Sub ButFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButFind.Click

Dim SWTrioleNo As Integer

SWTrioleNo = InputBox("Enter Triole Number:")

Me.TrackerBindingSource.RemoveFilter()

Try

Me.TrackerBindingSource.Filter = "TrioleNo =" & SWTrioleNo

Catch ex As System.Exception
MsgBox(ex.ToString)

End Try

End Sub

Many thanks inadvance.

Ken
 
confusing post.. whether or not textboxes populate is nothing to do with bindingsource filter


from your Data Sources window, drag one of the data nodes onto your form.. you see a data grid appear. If you want textboxes also (or instead) in the Data Sources window click the data node and use the dropdown button to change to 'details'. in this image, it is next to "store" :
http://www.nikhilk.net/Content/Posts/RADForRIA/DataSourcesWindow.png

Drag onto form again and a load of text boxes appear, bound to same bindingsource

run program.. data (if any in db) appears..

now set a relevant bs filter.. bs will appear to have only records passing the filter
 
Hi,

Sorry about the confusing way I put this, proberly why I have nad no responce :)

I have like you say added all the relevant text boxes, list boexes, etc to the form and I can see the data from access. I can even navigate which is great. But can't seem to filter/find, would it be best to filter on the datasource or the dataset?

Many thanks

Ken
 
Back
Top