C
Claudette Hennessy
This should be simple but...
I have a form that is opened by a form by specifying the year = xxxx (I
also tried year = xxxx or year is null, and various combinations of XOR)
The table data is:
Dealer Year
Dealer1 2008
Dealer2
Dealer3 2009
Dealer4 2009
Dealer5
Dealer6 2008
....
The desired output for 2008 would be
Dealer1 2008
Dealer2
Dealer3
Dealer4
Dealer5
Dealer6 2008
The desired output for 2009 would be
Dealer1
Dealer2
Dealer3 2009
Dealer4 2009
Dealer5
Dealer6
The query for the called form is
SELECT tblDealer.ShopID, tblDealer.ShopName, tblContractTemp.Spring,
tblContractTemp.Summer, tblContractTemp.Fall, tblContractTemp.Year
FROM tblContractTemp INNER JOIN tblDealer ON tblContractTemp.ShopID =
tblDealer.ShopID
ORDER BY tblDealer.ShopName
UNION SELECT tblDealer.ShopID, tblDealer.ShopName," " AS Spring, " " AS
Summer, " " AS Fall, " " AS Year
FROM tblContractTemp INNER JOIN tblDealer ON tblContractTemp.ShopID =
tblDealer.ShopID
ORDER BY tblDealer.ShopName;
The query runs fine on its own, but when the form is called from the dialog
form I get an 'Open Form is cancelled' message. The query returns
Dealer1
Dealer2
Dealer3
Dealer3 2009
Dealer4
Dealer4 2009
Dealer5
Dealer6
Which is not exactly what I want, but is close.
Thanks in advance,
Claudette
I have a form that is opened by a form by specifying the year = xxxx (I
also tried year = xxxx or year is null, and various combinations of XOR)
The table data is:
Dealer Year
Dealer1 2008
Dealer2
Dealer3 2009
Dealer4 2009
Dealer5
Dealer6 2008
....
The desired output for 2008 would be
Dealer1 2008
Dealer2
Dealer3
Dealer4
Dealer5
Dealer6 2008
The desired output for 2009 would be
Dealer1
Dealer2
Dealer3 2009
Dealer4 2009
Dealer5
Dealer6
The query for the called form is
SELECT tblDealer.ShopID, tblDealer.ShopName, tblContractTemp.Spring,
tblContractTemp.Summer, tblContractTemp.Fall, tblContractTemp.Year
FROM tblContractTemp INNER JOIN tblDealer ON tblContractTemp.ShopID =
tblDealer.ShopID
ORDER BY tblDealer.ShopName
UNION SELECT tblDealer.ShopID, tblDealer.ShopName," " AS Spring, " " AS
Summer, " " AS Fall, " " AS Year
FROM tblContractTemp INNER JOIN tblDealer ON tblContractTemp.ShopID =
tblDealer.ShopID
ORDER BY tblDealer.ShopName;
The query runs fine on its own, but when the form is called from the dialog
form I get an 'Open Form is cancelled' message. The query returns
Dealer1
Dealer2
Dealer3
Dealer3 2009
Dealer4
Dealer4 2009
Dealer5
Dealer6
Which is not exactly what I want, but is close.
Thanks in advance,
Claudette