Access query fields to be equal
ms-access
Solution
Your problem is that you write `= pyt_5` into the criteria field for the column `pyt_1`, and Access automatically converts it into `= "pyt_5"`, correct?
If yes, you need to put `pyt_5` in braces (`[ ]`). This makes the Access query editor recognize it as a column name.
Here is a screenshot (German Access version with German labels, but you get the idea):
Problem
I am teaching a guy to polish matura and they have to use Access sometimes. I have a table with columns `pyt_1`, `pyt_5`. I would like to display only these rows in which these columns are equal. In SQL it looks like that: ``` SELECT pyt_1, pyt_5 FROM Ankiety WHERE pyt_1=pyt_5; ``` but he has to know how to do it in query design I chose the `pyt_1`, `pyt_5` column and added criteria `pyt_1 = pyt_5` but ACCESS automatically converts it into string, how to avoid that? He converted my SQL into query design but it's weird.