On 11 Mar 2007 07:54:57 -0700, sixdeuce62 wrote:
Hello,
I am trying to create a query that will prompt me to enter the
parameter value if beginning date and ending date.
I have created everything I need in the query, but I have to manually
go into SQL view to change the date range. This is what I have so far:
TRANSFORM Count([Program Information].ID) AS CountOfID
SELECT [Program Information].[Client ID], Count([Program
Information].ID) AS [Total Of ID]
FROM [Program Information]
WHERE (((Format([Date In],"Short Date")) Between #2/1/2007# And
#2/28/2007#))
GROUP BY [Program Information].[Client ID]
PIVOT Format([Date In],"Short Date");
Like I said I can get any date range I want by going in here and
changing the dates, but I want it to prompt me to enter the beginning
and end date when I click on the query. I would like to set this up so
others won't have to go into the SQL view and change stuff around. I
am worried that others might accidentally change something they are
not supposed to.
Thanks for any help you can provide.
1) Change the query parameter to:
WHERE [Date In] Between [Enter Start Date] And
[Enter End Date]
2) In addition, in a Crosstab query you MUST also enter the parameter
and it's datatype in the Query Parameter dialog box.
In Query Design View, click on Query + Parameters.
Enter:
[Enter Star Date] DateTime
[Enter End Date] DateTime
in their appropriate columns. Include the brackets.
Save and runt the query.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail