I need to check if the first cell in the first col contains the characters “ND”.. The cell can either contain “Rm####” or “Rm####ND”. if the cell contains the “ND” characters then a picturebox on the form needs to be made visible.
this is the code that I am currently using to search the access database…
the search results alway only return one row of data from the datatable.
is there a way i can incorporate this with the search?
Try
Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='\\SERVER\Drawings\Database\Drawing Database.accdb'")
con.Open()
Me.DrawingsTableAdapter.DrawingNumber2(Me.Drawing_DatabaseDataSet.Drawings, ("%" & TextBox2.Text & "%"))
Me.Validate()
Me.TableAdapterManager.UpdateAll(Me.Drawing_DatabaseDataSet)
con.Close()
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
maybe you lost single quotation marks
“%'” & TextBox2.Text & “‘%”
see if it works
besides,I’ve never seen the function ‘DrawingNumber2’
and not found on the Internet.
Too much self-defined code,not so understandable.