I have many fields of data in a table. I want the user to type in the name of the field and use that in a query.
For example, the table looks like this:
DateAndTime, Field1, Field2, Field3, ... FieldX
--------------------------------------------------
6/20/2012 2:00PM, 14, 6, 45...
6/20/2012 2:00PM, 8, 5, 13...
6/20/2012 2:00PM, 53, 25, 62...
If the user types in "Field1" (through a form or parameter)
Then the query would select Field1:
14
8
53
I tried using a parameter in the SELECT statement and that did not work... any suggestions?