ianclaridge
New member
- Local time
- Today, 03:01
- Joined
- Jun 5, 2024
- Messages
- 3
I have a simple form based on a table for unskilled users to view and filter data using a combo box. Hence I simply want to add the the option "All" to the SELECT distinct query for values in that field but am encountering "unexpected error evaluating complex query". Here is my code....
SELECT "All" As Status
UNION
SELECT Distinct table1.Status As Status
FROM table1
Either part of the code (i.e. above or below the UNION) work fine individually, returning the expected value(s), and the existing table field is a short text one so in my view should not be in conflict with the type of the "All" value.
Can anyone tell me where I am going wrong as am sure this shouldn't be so difficult?
I really don't want to have to create a table that just contains a single field and row with the "All" value in it unless there is no other option!
Thanks in advance
Thanks for any help
SELECT "All" As Status
UNION
SELECT Distinct table1.Status As Status
FROM table1
Either part of the code (i.e. above or below the UNION) work fine individually, returning the expected value(s), and the existing table field is a short text one so in my view should not be in conflict with the type of the "All" value.
Can anyone tell me where I am going wrong as am sure this shouldn't be so difficult?
I really don't want to have to create a table that just contains a single field and row with the "All" value in it unless there is no other option!
Thanks in advance
Thanks for any help