to do a search, you could use a DataReader.
'declare stuff
Dim DataReader As OleDbDataReader
Dim Command As OleDbCommand
Dim Connection As OleDbConnection
Dim CustomerIdVar as string = "1234"
'connection string
Connection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Test.mdb")
'set up command object to do a select statement taking your var
Command = New OleDbCommand("Select * from Table1 Where CustomerID=" & CustomerIdVar)
Command.Connection = Connection
Command.Connection.Open()
'Execute the query
DataReader = Command.ExecuteReader()
If DataReader.HasRows()
'get the first row returned from the reader and display column in message box, column name in DB is ID
DataReader.Read()
msgbox(DataReader.Item("ID").ToString())
else
'display message
msgbox("That customer ID was not found")
endif
ok, there are probably errors in my code, I typed it up right here in the code block, but this is just to give you an idea on one way you could set up a search.