Hello there,
I am trying without much success to display multiple columns from a database where the selected data is dependant on specific common data.
I have tried using an SQL statement with a Jet 4.0 OLE DB connection.

SELECT Name,Date,Action FROM Track WHERE SerialNumber="1"

with the output displayed in a datagrid.
OK, this gives me roughly what I need. However, what I require is the option to define the value for SerialNumber at runtime.
Any assistance at all would be greatly appreciated. Even if someone could point me towards the type of information I should go in search of.
Cheers,
Lost

Thanks for the replies. I don't think I worded the question too well. The SQL wasn't the major problem , it was more to do with displaying the resulting recordset on my form.Using a data environment was OK until I introduced variables.
Anyway I finally got what I required using a Listview control.
http://www.vb6.us/ was a fantastic source of information and code.

This question has already been answered. Start a new discussion instead.