Following is the SQL. I added your suggestion [What controlNum] and got
no
information -- just blank fields. With the criteria statement removed
from
the field, I get the question "ControlNum", but inserting one number
returns
all numbers. Thank you
PARAMETERS ControlNum Text ( 255 );
SELECT Orders.OrderDate, Contracts.ContractNum, Customers.PONumber,
Customers.CompanyName, Customers.ContactFirstName,
Customers.ContactLastName, Customers.ContactTitle,
Customers.BillingAddress,
Customers.City, Customers.StateOrProvince, Customers.PostalCode,
Orders.ShipName, Orders.ShipAddress, Orders.ShipCity,
Orders.ShipStateOrProvince, Orders.ShipPostalCode, Orders.ShipCountry,
Orders.ShipPhoneNumber, Orders.MarkForName, Orders.MarkForAddress,
Orders.MarkForCountry, Orders.MarkForPostalCode, [Order Details].LineItem,
[Order Details].Quantity, Products.ProductCode, Products.BaseCodes,
Products.ProductName, Customers.ControlNum, [Order Details].SerialNum,
[Order Details].UnitPrice, [Order Details]!UnitPrice*[Order
Details]!Quantity AS [Total Price], IIf([Total Price]>=0,[Total
Price],Null)
AS [Amount Before Trade-In], IIf([Total Price]<0,[Total Price],Null) AS
[Trade-In Amount], [Order Details].OrderID, Orders.ShipDate, ([Amount
Before
Trade-In]*0.95) AS [Dealer 95%], (0.05*[Amount Before Trade-In]) AS [SEC
5%], Dealer.DealerName, Dealer.ContactPerson, Dealer.City, Dealer.State,
Dealer.UnitCode, Dealer.DealerNum, Dealer.DealerType, Dealer.DlvDlrJDInv,
Dealer.[JDInv$], Products.HandlingPct, -([JDInv$]*Products!HandlingPct) AS
[Handling $], Customers.Notes
FROM (Dealer INNER JOIN (Customers INNER JOIN Orders ON
Customers.CustomerID
= Orders.CustomerID) ON Dealer.DealerID = Orders.DealerID) INNER JOIN
(Contracts INNER JOIN ((SIN INNER JOIN Products ON SIN.SINID =
Products.SINID) INNER JOIN [Order Details] ON Products.ProductID = [Order
Details].ProductID) ON Contracts.ContractID = Products.ContractID) ON
Orders.OrderID = [Order Details].OrderID;
John Spencer said:
I suspect that you have declared the parameter, but haven't used it as
criteria against the Control Number.
Assumption:
Your parameter is [What Control Number]
You should have something like the following in the query grid (make sure
you spell the parameter the same way in both places or you will get two
prompts).
Field: ControlNumber
Criteria: [What Control Number]
If that fails, Please copy and post the SQL of your query.
(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message
I have created a parameter query that asks me for input; i.e. Control
Number. I enter a number, 52410, and get all of my control numbers
regardless of whether they start with 52..... or 31..., etc. I thought
that
I was to get only the one that I had input as the parameter.
I will be asking for this info numerous times and was trying to avoid
creating a new query each time, or entering changing the criteria
within
the
query.
Thank you