well tried readin many tut's about how to go about doing this but they seem to confuse me :S there seems to be many ways. i understand the concepts of what is required, but jus cant implement it into code

http://www.programmersheaven.com/mb/VBNET/389030/389030/database-search-/?S=B20000

So im trying to display results from a form into a new datagrid on another form (when i click search), difficulty is i have included a combo box and a checklist box too.

at the moment ma code looks like this

Dim SQO As String
        Dim DC5 As New OleDb.OleDbCommand()

        SQO = "SELECT RoomID,[Additional requirements],[Date required],[Time required],[Projector/IWB use?] from Bookings,Rooms WHERE RoomID LIKE ('" & TextBox1.Text & "'),[Additional requirements] LIKE ('" & ComboBox1.Text & "'),[Date required] LIKE ('" & TextBox2.Text & "'),[Time required] LIKE ('" & TextBox3.Text & "'),[Projector/IWB use?] LIKE ('" & CheckedListBox1.Text & "')"
        DC5 = New OleDbCommand(SQO, cn)
        DC5.ExecuteNonQuery()


        myDA.Fill(DataQ, "MQ")
        SearchResults.DataGridView1.DataSource = DataQ
        SearchResults.DataGridView1.DataMember = "MQ"

Search results is the form in which the datagrid is in.. and i havnt used space in ma SQL statement yet(i dont even know if its right!)

I was thinkin bou using query builder, i jus basically want to be able to search from textbox and combo boxed to build the query..

need help asapp please

many thanks

ok i think i made a big hash of my sql statement can any on help

Dim cmd As String = "SELECT RoomID,[Additional requirements],[Date required],[Time required],[Projector/IWB use?] from Bookings,Rooms WHERE " _
        " RoomID LIKE ('" & TextBox1.Text & "')" _
        " [Additional requirements] LIKE ('" & ComboBox1.Text & "') " _
        "[Date required] LIKE ('" & TextBox2.Text & "')" _
        "[Time required] LIKE ('" & TextBox3.Text & "')"_
        "[Projector/IWB use?] LIKE ('" & CheckedListBox1.Text & "')" )"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.