Query Question

B

Bill

I have the following in Criteria: Between [StartingDate] And
DateAdd("d",[How Many Days],[StartingDate])
When I run the Query I have to enter the Data twice. What I’m doing wrong?
Thanks to anyone who can point out my error. I know it has to something
simple that I’m missing.
Thanks,
Bill
 
D

Dirk Goldgar

Bill said:
I have the following in Criteria: Between [StartingDate] And
DateAdd("d",[How Many Days],[StartingDate])
When I run the Query I have to enter the Data twice. What I’m doing wrong?
Thanks to anyone who can point out my error. I know it has to something
simple that I’m missing.


What do you get prompted for twice? My guess would be that you have spelled
it slightly differently in different places.
 
D

Dirk Goldgar

Bill said:
I have to enter "How mnay days" & "Starting Date". Don't know why.

You have to enter both of them twice? Please post the SQL View of the
query.
 
J

John W. Vinson

I have to enter "How mnay days" & "Starting Date". Don't know why.
Thanks,
Bill

Bill said:
I have the following in Criteria: Between [StartingDate] And
DateAdd("d",[How Many Days],[StartingDate])
When I run the Query I have to enter the Data twice. What I’m doing wrong?
Thanks to anyone who can point out my error. I know it has to something
simple that I’m missing.
Thanks,
Bill

Ummm...

That's exactly what you're asking for. You have one parameter [How Many Days]
and another parameter [StartingDate]. Access is asking you for both of them.

What do you expect? If you're asking for each parameter twice, perhaps you
could post the SQL view of the entire query.
 
B

Bill

Here is the SQL. I may be nuts but ,I think it works fine for one try. Then
it does not.
Thanks,
Bill

SELECT AllNumbers_Dly.drwDate , AllNumbers_Dly. drwGame ,
AllNumbers_Dly. drwNumbersOne , AllNumbers_Dly. drwNumbersTwo ,
AllNumbers_Dly. drwNumbersThree
FROM AllNumbers_Dly
WHERE (((AllNumbers_Dly.drwDate ) Between [StartingDate] And
DateAdd(("d"),[How Many Days],[StartingDate])))
ORDER BY AllNumbers_Dly.drwDate DESC , AllNumbers_Dly. drwNumbersOne DESC;


John W. Vinson said:
I have to enter "How mnay days" & "Starting Date". Don't know why.
Thanks,
Bill

Bill said:
I have the following in Criteria: Between [StartingDate] And
DateAdd("d",[How Many Days],[StartingDate])
When I run the Query I have to enter the Data twice. What I’m doing wrong?
Thanks to anyone who can point out my error. I know it has to something
simple that I’m missing.
Thanks,
Bill

Ummm...

That's exactly what you're asking for. You have one parameter [How Many Days]
and another parameter [StartingDate]. Access is asking you for both of them.

What do you expect? If you're asking for each parameter twice, perhaps you
could post the SQL view of the entire query.
 
J

John W. Vinson

Here is the SQL. I may be nuts but ,I think it works fine for one try. Then
it does not.
Thanks,
Bill

SELECT AllNumbers_Dly.drwDate , AllNumbers_Dly. drwGame ,
AllNumbers_Dly. drwNumbersOne , AllNumbers_Dly. drwNumbersTwo ,
AllNumbers_Dly. drwNumbersThree
FROM AllNumbers_Dly
WHERE (((AllNumbers_Dly.drwDate ) Between [StartingDate] And
DateAdd(("d"),[How Many Days],[StartingDate])))
ORDER BY AllNumbers_Dly.drwDate DESC , AllNumbers_Dly. drwNumbersOne DESC;

What prompts do you get, in what order?
In what way does it "not work" on the second try? The second time you open the
query or what? Do you get no results, wrong results, an error message?
 
D

Dirk Goldgar

Bill said:
Here is the SQL. I may be nuts but ,I think it works fine for one try.
Then
it does not.
Thanks,
Bill

SELECT AllNumbers_Dly.drwDate , AllNumbers_Dly. drwGame ,
AllNumbers_Dly. drwNumbersOne , AllNumbers_Dly. drwNumbersTwo ,
AllNumbers_Dly. drwNumbersThree
FROM AllNumbers_Dly
WHERE (((AllNumbers_Dly.drwDate ) Between [StartingDate] And
DateAdd(("d"),[How Many Days],[StartingDate])))
ORDER BY AllNumbers_Dly.drwDate DESC , AllNumbers_Dly. drwNumbersOne
DESC;


Is AllNumbers_Dly a table or a query? If it's a query, what is the SQL of
the query?
 

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