chrisguk
Active member
- Joined
- Nov 20, 2011
- Messages
- 29
- Programming Experience
- Beginner
Hi,
I have been trying to create a filter search as instructed by many Youtube tutorials but I am unable to get my code to work:
This is what I have. I created a query in the Query Builder like so:
Then I click ok but it only generates a Find button and no text box. The code that is generated is as follows:
From the tutorials I notice that an element is missing like below:
So I went back to basics and re-created the Query in Query Builder, this time I executed the query in the QB, but all of my columns are displayed as NULL when I know I have data in the tables.
I am using Visual Basic Express 2010.
Does anyone have any ideas?
I have been trying to create a filter search as instructed by many Youtube tutorials but I am unable to get my code to work:
This is what I have. I created a query in the Query Builder like so:
VB.NET:
SELECT SitesID, SiteCode, SiteName, fkStatoID, fkSimInstalledID, fkMeterInstalledID, fkPowerMaster, fkProgramActive
FROM Sites
WHERE (SiteCode LIKE '@SiteName' + '%')
Then I click ok but it only generates a Find button and no text box. The code that is generated is as follows:
VB.NET:
Private Sub FillBySearchSNToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FillBySearchSNToolStripButton.Click
Try
Me.SitesTableAdapter.FillBySearchSN(Me._EMIBE_mdbDataSet.Sites)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
End Sub
From the tutorials I notice that an element is missing like below:
VB.NET:
Me.SitesTableAdapter.FillBySearchSN(Me._EMIBE_mdbDataSet.Sites, textbox1.text)
So I went back to basics and re-created the Query in Query Builder, this time I executed the query in the QB, but all of my columns are displayed as NULL when I know I have data in the tables.
I am using Visual Basic Express 2010.
Does anyone have any ideas?