N
Nurse Nancy
Hi
I have a mult-value Selection field and i am using it a form to run a query
to find matches from another table.
I know this is bad,, but it's too late,, i wish MS had never done this to
us!!!!!
PLEASE HELP
it works ok except 2 major problems
1. There are over 100 values to select and I want to be able to select All,
or leave the form field blank in order to bypass this filter
But if i leave it blank, i get no matches and if I add Or Is Null in design
view I still get no matches
I tried adding a value of 'ALL' to the selection lits, but i have no idea
how i would code this.
2. If I want to clear the checkboxes of all that are selected, I don't know
how to do this
Here's the SQL for the query
Target Audience ID].Value)
SELECT DISTINCTROW CP.[Campaign ID], CP.[Customer ID], CP.ProductName,
RS.[Station Call Letters], RS.[Market ID], RS.Rank, Rank.Rank, RS.[Format
ID], CP.[Target Audience ID], CP.[Flight Start Date], CP.[Spot Length],
CP.[Employee ID]
FROM (([FORMATS TABLE] AS F INNER JOIN ([RADIO STATIONS TABLE] AS RS INNER
JOIN ([MARKETS TABLE] AS M INNER JOIN ([TARGET AUDIENCE TABLE] AS T INNER
JOIN ([Rank Table] AS Rank INNER JOIN [CAMPAIGN PRODUCT TABLE] AS CP ON
Rank.ID=CP.Rank) ON T.[Target Audience ID]=CP.[Target Audience ID].Value) ON
M.[Market ID]=CP.[Market ID].Value) ON RS.[Market ID]=M.[Market ID]) ON
(F.[Format Abbreviation]=T.Format.Value) AND (F.[Format
Abbreviation]=RS.[Format ID])) INNER JOIN [PRODUCT CATEGORY TABLE] ON
CP.[Product Category ID]=[PRODUCT CATEGORY TABLE].[Product Category ID])
INNER JOIN [PRODUCTS TABLE] ON CP.ProductName=[PRODUCTS TABLE].ProductName
WHERE (((CP.[Campaign ID])=Forms![Maintain Products Form]![Campaign ID]) And
((RS.Rank)<=RANK!Rank))
ORDER BY RS.[Station Call Letters];
Nancy
I have a mult-value Selection field and i am using it a form to run a query
to find matches from another table.
I know this is bad,, but it's too late,, i wish MS had never done this to
us!!!!!
PLEASE HELP
it works ok except 2 major problems
1. There are over 100 values to select and I want to be able to select All,
or leave the form field blank in order to bypass this filter
But if i leave it blank, i get no matches and if I add Or Is Null in design
view I still get no matches
I tried adding a value of 'ALL' to the selection lits, but i have no idea
how i would code this.
2. If I want to clear the checkboxes of all that are selected, I don't know
how to do this
Here's the SQL for the query
Target Audience ID].Value)
SELECT DISTINCTROW CP.[Campaign ID], CP.[Customer ID], CP.ProductName,
RS.[Station Call Letters], RS.[Market ID], RS.Rank, Rank.Rank, RS.[Format
ID], CP.[Target Audience ID], CP.[Flight Start Date], CP.[Spot Length],
CP.[Employee ID]
FROM (([FORMATS TABLE] AS F INNER JOIN ([RADIO STATIONS TABLE] AS RS INNER
JOIN ([MARKETS TABLE] AS M INNER JOIN ([TARGET AUDIENCE TABLE] AS T INNER
JOIN ([Rank Table] AS Rank INNER JOIN [CAMPAIGN PRODUCT TABLE] AS CP ON
Rank.ID=CP.Rank) ON T.[Target Audience ID]=CP.[Target Audience ID].Value) ON
M.[Market ID]=CP.[Market ID].Value) ON RS.[Market ID]=M.[Market ID]) ON
(F.[Format Abbreviation]=T.Format.Value) AND (F.[Format
Abbreviation]=RS.[Format ID])) INNER JOIN [PRODUCT CATEGORY TABLE] ON
CP.[Product Category ID]=[PRODUCT CATEGORY TABLE].[Product Category ID])
INNER JOIN [PRODUCTS TABLE] ON CP.ProductName=[PRODUCTS TABLE].ProductName
WHERE (((CP.[Campaign ID])=Forms![Maintain Products Form]![Campaign ID]) And
((RS.Rank)<=RANK!Rank))
ORDER BY RS.[Station Call Letters];
Nancy