DK
2008-05-06 12:48:45 UTC
Code below allows me to select a value from a dropdown box and enter a filter value in the text box. The GridView displays data based upon my search/filter criteria. It works...but only one time! How do I refresh the page/GridView control so I can use it over and over again?
---------------------------------------------------------
Dim strConnectionString As String
Dim strGetData As String
Dim strSearchValue As String
Dim strFilterValue As String
GridView1.DataSource = Nothing
strConnectionString = "C:\FDX\MyMeterWebsite\App_Data\Meters.mdb"
strSearchValue = Me.ddownList.Text
strFilterValue = Me.txtFilter.Text
strGetData = "Select * From Meters"
strGetData = strGetData & " Where " & strSearchValue
strGetData = strGetData & " Like '" & strFilterValue & "%'"
AccessMeters.DataFile = strConnectionString
AccessMeters.SelectCommand = strGetData
GridView1.DataSource = AccessMeters
---------------------------------------------------