This is how I did it and I get a data type miss match, but tamp is an integer so I am thinking it is some thing else (I also pass an integer in to tamp at another stage in the program). Do I need to pass it though another int? Or is it a problem with my access statement? The whole block of code worked without the extra where parameter and the for loop.
The for loop help me load them in that order and that is important for what I am doing with it
for (int i = -100; i < 100; i++)
{
try
{
connection.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = connection;
string query = "select * from Table1 where Status='" + comboBox5.Text + "'AND Tamp='" + i + "'";
command.CommandText = query;
listBox9.Items.Clear();
OleDbDataReader reader = command.ExecuteReader();
while (reader.Read())
{
listBox9.Items.Add(reader["Description"].ToString());
}
// MessageBox.Show("Data Saved");
connection.Close();
}
catch (Exception ex)
{ MessageBox.Show("error " + ex); }
}