P
PeterM
I have a simple form with a combobox. The source of the combobox is a query
that is:
SELECT distinct firstname & " " & lastname AS Expr1
FROM contacts
UNION select distinct ap_with_whom
from calendar
ORDER BY 1;
When I run the query outside of the form, it returns what I expect. All
name entries from the contacts and calendar entries. However, when I run it
from within the form, I get different results. It only returns entries from
the calendar table. As a matter of fact, I use the same query in several
places and when run from the form, it only returns the entries from the
calendar table. This makes no sense to me. There are no filters on the
form.
I even tried to flip the query to:
select distinct ap_with_whom
from appointments
UNION SELECT distinct firstname & " " & lastname AS Expr1
FROM addresses
ORDER BY 1;
and I still get the same results.
Why am I getting different results from the form and from the query?
that is:
SELECT distinct firstname & " " & lastname AS Expr1
FROM contacts
UNION select distinct ap_with_whom
from calendar
ORDER BY 1;
When I run the query outside of the form, it returns what I expect. All
name entries from the contacts and calendar entries. However, when I run it
from within the form, I get different results. It only returns entries from
the calendar table. As a matter of fact, I use the same query in several
places and when run from the form, it only returns the entries from the
calendar table. This makes no sense to me. There are no filters on the
form.
I even tried to flip the query to:
select distinct ap_with_whom
from appointments
UNION SELECT distinct firstname & " " & lastname AS Expr1
FROM addresses
ORDER BY 1;
and I still get the same results.
Why am I getting different results from the form and from the query?