Why does my query ask for a paramater value?

C

Caleb

Hello, I have two querys, one runs off the other. The first query simply has
the Criteria set to ' Like "Accepted *" ' for the [ApprovedStatus] field so
it pulls out all but the declines.

The second query runs off the first, and the second has all the same fields
except I have the Criteria for the [OrderId] field set to ' <1000000000 '
to pull out all the orders under a million. Now I couldn't set this Criteria
in the first query becaue for some reason it still pulls a few records that
are over a million because they're listed as Accepted in the [ApprovedStatus]
field.

Now if someone can tell me how to include both these Criteria in one query
that would be best but otherwise my problem is that everytime I try to run
this second query an "Input Paramater Value" input box for Query1.OrderId
pops up. If I hit okay without entering anything a get the right results but
I have no idea why this input box is showing up. I have no querys named
'Query1' so I'm stumped.

Any help would be greatly appreciated,
Thanks in advance,
Caleb
 
D

Dale Fye

What is the SQL of your Query. Open the query in design view, then change to
the SQL view. Copy it and paste it in your response.

My guess is that you have a parameter defined. You can tell by looking at
the SQL, or if you right click in the grey area next to one of the tables in
the query design mode, and select the parameters option, the Parameters
dialog box will open. If you have a parameter defined here, delete it.
 
C

Caleb

I did check the paramaters and there are none...
Here is the SQL:

SELECT [Show all Accepted Orders].OrderId, [Show all Accepted Orders].Email,
[Show all Accepted Orders].FirstName, [Show all Accepted Orders].LastName,
[Show all Accepted Orders].ApproveStatus, [Show all Accepted Orders].Phone,
[Show all Accepted Orders].OrderDate, [Show all Accepted
Orders].ProductsOrdered, [Show all Accepted Orders].SKU, [Show all Accepted
Orders].Total, [Show all Accepted Orders].ShipToName, [Show all Accepted
Orders].ShipToAddress1, [Show all Accepted Orders].ShipToAddress2, [Show all
Accepted Orders].ShipToCity, [Show all Accepted Orders].ShipToState, [Show
all Accepted Orders].ShipToZip, [Show all Accepted Orders].ShipToCountry,
[Show all Accepted Orders].HowHeard, [Show all Accepted Orders].price
FROM [Show all Accepted Orders]
WHERE ((([Show all Accepted Orders].OrderId)<1000000000));





Dale Fye said:
What is the SQL of your Query. Open the query in design view, then change to
the SQL view. Copy it and paste it in your response.

My guess is that you have a parameter defined. You can tell by looking at
the SQL, or if you right click in the grey area next to one of the tables in
the query design mode, and select the parameters option, the Parameters
dialog box will open. If you have a parameter defined here, delete it.

----
HTH
Dale



Caleb said:
Hello, I have two querys, one runs off the other. The first query simply has
the Criteria set to ' Like "Accepted *" ' for the [ApprovedStatus] field so
it pulls out all but the declines.

The second query runs off the first, and the second has all the same fields
except I have the Criteria for the [OrderId] field set to ' <1000000000 '
to pull out all the orders under a million. Now I couldn't set this Criteria
in the first query becaue for some reason it still pulls a few records that
are over a million because they're listed as Accepted in the [ApprovedStatus]
field.

Now if someone can tell me how to include both these Criteria in one query
that would be best but otherwise my problem is that everytime I try to run
this second query an "Input Paramater Value" input box for Query1.OrderId
pops up. If I hit okay without entering anything a get the right results but
I have no idea why this input box is showing up. I have no querys named
'Query1' so I'm stumped.

Any help would be greatly appreciated,
Thanks in advance,
Caleb
 
C

Caleb

Here is the SQL for that query:

SELECT [Fresh Import From 1ShoppingCart].OrderId, [Fresh Import From
1ShoppingCart].Email, [Fresh Import From 1ShoppingCart].FirstName, [Fresh
Import From 1ShoppingCart].LastName, [Fresh Import From
1ShoppingCart].ApproveStatus, [Fresh Import From 1ShoppingCart].Phone, [Fresh
Import From 1ShoppingCart].OrderDate, [Fresh Import From
1ShoppingCart].ProductsOrdered, [Fresh Import From 1ShoppingCart].SKU, [Fresh
Import From 1ShoppingCart].Total, [Fresh Import From
1ShoppingCart].ShipToName, [Fresh Import From 1ShoppingCart].ShipToAddress1,
[Fresh Import From 1ShoppingCart].ShipToAddress2, [Fresh Import From
1ShoppingCart].ShipToCity, [Fresh Import From 1ShoppingCart].ShipToState,
[Fresh Import From 1ShoppingCart].ShipToZip, [Fresh Import From
1ShoppingCart].ShipToCountry, [Fresh Import From 1ShoppingCart].HowHeard,
[Fresh Import From 1ShoppingCart].price
FROM [Fresh Import From 1ShoppingCart]
WHERE ((([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted *"
Or ([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted" Or
([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted: *" Or
([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted:"));


Hans Up said:
Caleb said:
I did check the paramaters and there are none...
Here is the SQL:

Please show us the SQL for the other query --- the one which includes
this criteria:
the Criteria set to ' Like "Accepted *" ' for the [ApprovedStatus] field so
 
H

Hans Up

Caleb said:
Here is the SQL for that query:

SELECT [Fresh Import From 1ShoppingCart].OrderId, [Fresh Import From
1ShoppingCart].Email, [Fresh Import From 1ShoppingCart].FirstName, [Fresh
Import From 1ShoppingCart].LastName, [Fresh Import From
1ShoppingCart].ApproveStatus, [Fresh Import From 1ShoppingCart].Phone, [Fresh
Import From 1ShoppingCart].OrderDate, [Fresh Import From
1ShoppingCart].ProductsOrdered, [Fresh Import From 1ShoppingCart].SKU, [Fresh
Import From 1ShoppingCart].Total, [Fresh Import From
1ShoppingCart].ShipToName, [Fresh Import From 1ShoppingCart].ShipToAddress1,
[Fresh Import From 1ShoppingCart].ShipToAddress2, [Fresh Import From
1ShoppingCart].ShipToCity, [Fresh Import From 1ShoppingCart].ShipToState,
[Fresh Import From 1ShoppingCart].ShipToZip, [Fresh Import From
1ShoppingCart].ShipToCountry, [Fresh Import From 1ShoppingCart].HowHeard,
[Fresh Import From 1ShoppingCart].price
FROM [Fresh Import From 1ShoppingCart]
WHERE ((([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted *"
Or ([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted" Or
([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted: *" Or
([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted:"));

Does that query work OK on its own? (ie - when it's not being called
from the other query)

I don't see any reason this query would treat OrderId as a parameter,
unless the field name was changed in the table after you first created
the query.
 
C

Caleb

That query runs fine on its own and the field names havent been changed,

Hans Up said:
Caleb said:
Here is the SQL for that query:

SELECT [Fresh Import From 1ShoppingCart].OrderId, [Fresh Import From
1ShoppingCart].Email, [Fresh Import From 1ShoppingCart].FirstName, [Fresh
Import From 1ShoppingCart].LastName, [Fresh Import From
1ShoppingCart].ApproveStatus, [Fresh Import From 1ShoppingCart].Phone, [Fresh
Import From 1ShoppingCart].OrderDate, [Fresh Import From
1ShoppingCart].ProductsOrdered, [Fresh Import From 1ShoppingCart].SKU, [Fresh
Import From 1ShoppingCart].Total, [Fresh Import From
1ShoppingCart].ShipToName, [Fresh Import From 1ShoppingCart].ShipToAddress1,
[Fresh Import From 1ShoppingCart].ShipToAddress2, [Fresh Import From
1ShoppingCart].ShipToCity, [Fresh Import From 1ShoppingCart].ShipToState,
[Fresh Import From 1ShoppingCart].ShipToZip, [Fresh Import From
1ShoppingCart].ShipToCountry, [Fresh Import From 1ShoppingCart].HowHeard,
[Fresh Import From 1ShoppingCart].price
FROM [Fresh Import From 1ShoppingCart]
WHERE ((([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted *"
Or ([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted" Or
([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted: *" Or
([Fresh Import From 1ShoppingCart].ApproveStatus) Like "Accepted:"));

Does that query work OK on its own? (ie - when it's not being called
from the other query)

I don't see any reason this query would treat OrderId as a parameter,
unless the field name was changed in the table after you first created
the query.
 
H

Hans Up

Caleb said:
That query runs fine on its own and the field names havent been changed,

In that case, I'm stumped. I went back and reviewed the SQL again for
the other query. The only possible reason I could come up with for why
it would treat OrderId as a parameter is if this one (Show all Accepted
Orders) thought it was a parameter.

Sorry,
Hans
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top