Enter Parameter Value

J

jdickerson

I have set up a select query that sums multiple fields. I have entered
criteria that prompts the user to enter beginning and ending dates. After
these prompts I am being asked to enter values for SumofLotSize and Totals.
After pressing enter without entering any values for these two fields the
query runs as it should. I will not be the only user accessing this query.
Is there any way to prevent these prompts from popping up so as not to
confuse other users.

SQL:

Sum([Reject Rates].Trim) AS SumOfTrim, Sum([Reject Rates].Bubbles) AS
SumOfBubbles, Sum([Reject Rates].Wrinkles) AS SumOfWrinkles, Sum([Reject
Rates].[Foreign Matter]) AS [SumOfForeign Matter], Sum([Reject Rates].Shorts)
AS SumOfShorts, Sum([Reject Rates].Flashing) AS SumOfFlashing, Sum([Reject
Rates].[Bad Mix]) AS [SumOfBad Mix], Sum([Reject Rates].[Bad Material]) AS
[SumOfBad Material], Sum([Reject Rates].[Heel Seal]) AS [SumOfHeel Seal],
Sum([Reject Rates].[Edge Seal]) AS [SumOfEdge Seal], Sum([Reject
Rates].Pitting) AS SumOfPitting, Sum([Reject Rates].[Tear Drops]) AS
[SumOfTear Drops], Sum([Reject Rates].Sinks) AS SumOfSinks, Sum([Reject
Rates].Streaks) AS SumOfStreaks, Sum([Reject Rates].Gates) AS SumOfGates,
Sum([Reject Rates].Other) AS SumOfOther, [Mold Marks]/[Lot Size] AS [Mold
Marks%], [Trim]/[Lot Size] AS [Trim%], [Bubbles]/[Lot size] AS [Bubbles%],
[Wrinkles]/[Lot Size] AS [Wrinkles%], [Foreign Matter]/[Lot Size] AS [Foreign
Matter%], [Shorts]/[LOt Size] AS [Shorts%], [Flashing]/[Lot Size] AS
[Flashing%], [Bad Mix]/[Lot Size] AS [Bad Mix%], [Bad Material]/[Lot Size] AS
[Bad Material%], [Heel Seal]/[Lot Size] AS [Heel Seal%], [Edge Seal]/[Lot
Size] AS [Edge Seal%], [Pitting]/[Lot Size] AS [Pitting%], [Tear Drops]/[Lot
Size] AS [Tear Drops%], [Sinks]/[Lot Size] AS [Sinks%], [Streaks]/[Lot Size]
AS [Streak%], [Gates]/[LOt SIze] AS [Gates%], [OTher]/[Lot Size] AS [Other%],
[MOld Marks]+[Trim]+[Bubbles]+[Wrinkles]+[Foreign
Matter]+[Shorts]+[Flashing]+[Bad Mix]+[Bad Material]+[Heel Seal]+[Edge
Seal]+[Pitting]+[Tear Drops]+[Sinks]+[Streaks]+[Gates]+[Other] AS Totals,
[Totals]/[SumOfLot Size] AS [Totals%], [Reject Rates].[Production Run]
FROM [Reject Rates]
GROUP BY [Reject Rates].[Item#], [Mold Marks]/[Lot Size], [Trim]/[Lot Size],
[Bubbles]/[Lot size], [Wrinkles]/[Lot Size], [Foreign Matter]/[Lot Size],
[Shorts]/[LOt Size], [Flashing]/[Lot Size], [Bad Mix]/[Lot Size], [Bad
Material]/[Lot Size], [Heel Seal]/[Lot Size], [Edge Seal]/[Lot Size],
[Pitting]/[Lot Size], [Tear Drops]/[Lot Size], [Sinks]/[Lot Size],
[Streaks]/[Lot Size], [Gates]/[LOt SIze], [OTher]/[Lot Size], [MOld
Marks]+[Trim]+[Bubbles]+[Wrinkles]+[Foreign Matter]+[Shorts]+[Flashing]+[Bad
Mix]+[Bad Material]+[Heel Seal]+[Edge Seal]+[Pitting]+[Tear
Drops]+[Sinks]+[Streaks]+[Gates]+[Other], [Totals]/[SumOfLot Size], [Reject
Rates].[Production Run]
HAVING ((([Reject Rates].[Production Run]) Between [What is the 1st day of
the month in which you would like to view rate?] And [What is the last day of
the month?]));


Thanks in advance for your help.
Jamie
 
K

Ken Snell \(MVP\)

Your query is asking you for those parameters because the query's data table
(RejectRates) does not include those two fields, so the query asks you for
the values. If you don't want the user to be asked for those values, either
take them out of the query or else have the RejectRates table/query include
them as fields.

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


jdickerson said:
I have set up a select query that sums multiple fields. I have entered
criteria that prompts the user to enter beginning and ending dates. After
these prompts I am being asked to enter values for SumofLotSize and
Totals.
After pressing enter without entering any values for these two fields the
query runs as it should. I will not be the only user accessing this query.
Is there any way to prevent these prompts from popping up so as not to
confuse other users.

SQL:

Sum([Reject Rates].Trim) AS SumOfTrim, Sum([Reject Rates].Bubbles) AS
SumOfBubbles, Sum([Reject Rates].Wrinkles) AS SumOfWrinkles, Sum([Reject
Rates].[Foreign Matter]) AS [SumOfForeign Matter], Sum([Reject
Rates].Shorts)
AS SumOfShorts, Sum([Reject Rates].Flashing) AS SumOfFlashing, Sum([Reject
Rates].[Bad Mix]) AS [SumOfBad Mix], Sum([Reject Rates].[Bad Material]) AS
[SumOfBad Material], Sum([Reject Rates].[Heel Seal]) AS [SumOfHeel Seal],
Sum([Reject Rates].[Edge Seal]) AS [SumOfEdge Seal], Sum([Reject
Rates].Pitting) AS SumOfPitting, Sum([Reject Rates].[Tear Drops]) AS
[SumOfTear Drops], Sum([Reject Rates].Sinks) AS SumOfSinks, Sum([Reject
Rates].Streaks) AS SumOfStreaks, Sum([Reject Rates].Gates) AS SumOfGates,
Sum([Reject Rates].Other) AS SumOfOther, [Mold Marks]/[Lot Size] AS [Mold
Marks%], [Trim]/[Lot Size] AS [Trim%], [Bubbles]/[Lot size] AS [Bubbles%],
[Wrinkles]/[Lot Size] AS [Wrinkles%], [Foreign Matter]/[Lot Size] AS
[Foreign
Matter%], [Shorts]/[LOt Size] AS [Shorts%], [Flashing]/[Lot Size] AS
[Flashing%], [Bad Mix]/[Lot Size] AS [Bad Mix%], [Bad Material]/[Lot Size]
AS
[Bad Material%], [Heel Seal]/[Lot Size] AS [Heel Seal%], [Edge Seal]/[Lot
Size] AS [Edge Seal%], [Pitting]/[Lot Size] AS [Pitting%], [Tear
Drops]/[Lot
Size] AS [Tear Drops%], [Sinks]/[Lot Size] AS [Sinks%], [Streaks]/[Lot
Size]
AS [Streak%], [Gates]/[LOt SIze] AS [Gates%], [OTher]/[Lot Size] AS
[Other%],
[MOld Marks]+[Trim]+[Bubbles]+[Wrinkles]+[Foreign
Matter]+[Shorts]+[Flashing]+[Bad Mix]+[Bad Material]+[Heel Seal]+[Edge
Seal]+[Pitting]+[Tear Drops]+[Sinks]+[Streaks]+[Gates]+[Other] AS Totals,
[Totals]/[SumOfLot Size] AS [Totals%], [Reject Rates].[Production Run]
FROM [Reject Rates]
GROUP BY [Reject Rates].[Item#], [Mold Marks]/[Lot Size], [Trim]/[Lot
Size],
[Bubbles]/[Lot size], [Wrinkles]/[Lot Size], [Foreign Matter]/[Lot Size],
[Shorts]/[LOt Size], [Flashing]/[Lot Size], [Bad Mix]/[Lot Size], [Bad
Material]/[Lot Size], [Heel Seal]/[Lot Size], [Edge Seal]/[Lot Size],
[Pitting]/[Lot Size], [Tear Drops]/[Lot Size], [Sinks]/[Lot Size],
[Streaks]/[Lot Size], [Gates]/[LOt SIze], [OTher]/[Lot Size], [MOld
Marks]+[Trim]+[Bubbles]+[Wrinkles]+[Foreign
Matter]+[Shorts]+[Flashing]+[Bad
Mix]+[Bad Material]+[Heel Seal]+[Edge Seal]+[Pitting]+[Tear
Drops]+[Sinks]+[Streaks]+[Gates]+[Other], [Totals]/[SumOfLot Size],
[Reject
Rates].[Production Run]
HAVING ((([Reject Rates].[Production Run]) Between [What is the 1st day of
the month in which you would like to view rate?] And [What is the last day
of
the month?]));


Thanks in advance for your help.
Jamie
 
Top