I have stumbled upon an annoying thing in access. I have a table with 20-30 columns and 20 rows. The columns are materials (types of metal), and the rows are plate thicknesses available in different countries.
We would like the user to select country followed by material in two combo boxes. Then use a query to show only the column with the thicknesses (rows) and the one column with the selected material.
I have tried this without luck:
SELECT [Forms]![Form1]![ComboBox] AS ThisCol
FROM Table1;
It just fills all cells with the value from the combo box (material selection). However, using the switch function works:
SELECT Switch([Forms]![Form1]![ComboBox]="Col1",[Col1]) AS ThisCol
FROM Table1;
This gives a table with the one column selected in the ComboBox. That is a solution, but i dont like it, since i have to add every 30 single switch cases, and sometimes it may not be me adding materials.
Can this be done in a smarter way?
WHEREstatement, and that's essentially what you're referring to..