Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ROWFILTER QUESTION

Status
Not open for further replies.

trimakassi

Programmer
Aug 5, 2005
20
MA
I created a subroutine to filter a dataview and i want to pass the colum to be filtered through a declared string variable
ex. lets say I want to filter the date column
x="date"
then i call the routine and send x
in the routine i have a dataview.rowfilter that looks like this

Private Sub Filter(ByVal dtv As DataView, ByVal x As String)
Try
dtv.RowFilter = " '" & x & "' = '" & CInt(txt1.Text) & "'"
Catch ex As Exception

End Try

End Sub

this returns a blank databview

please help

thanks
trimakassi
 
Do these changes and post again to tell us what happened.

Private Sub Filter(ByRef dtv As DataView, ByVal x As String)

dtv.RowFilter = "x=" & txt1.Text
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top