By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

Passing a date range into a crosstab query

P: 1
I'm trying to allow a user to type in a beginning data and an ending date to be used in a crosstab query - Below is the query:

Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Count(imagingdb.ID) AS CountOfID
  2. TRANSFORM Count(imagingdb.ID) AS CountOfID
  3. SELECT imagingdb.Scheduled, imagingdb.ATT, imagingdb.ACQ
  4. FROM imagingdb
  5. WHERE (((imagingdb.Scheduled) Is Not Null) AND ((imagingdb.ATT) Is Not Null) AND ((imagingdb.ACQ) Is Not Null) AND ((imagingdb.Project) Is Not Null))
  6. GROUP BY imagingdb.Scheduled, imagingdb.ATT, imagingdb.ACQ
  7. PIVOT imagingdb.Project;
It works if I type the date range Between 4/1/2007 And 4/30/2007 but I want to give the user a form and let them type in the range. I tryed the Between [Enter Beginning Date] And [Enter Ending Date] and I tryed a form for the date but to no avail.

Any help would be appreciated
May 19 '07 #1
Share this Question
Share on Google+
1 Reply


JConsulting
Expert 100+
P: 603
I'm trying to allow a user to type in a beginning data and an ending date to be used in a crosstab query - Below is the query:

Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Count(imagingdb.ID) AS CountOfID
  2. TRANSFORM Count(imagingdb.ID) AS CountOfID
  3. SELECT imagingdb.Scheduled, imagingdb.ATT, imagingdb.ACQ
  4. FROM imagingdb
  5. WHERE (((imagingdb.Scheduled) Is Not Null) AND ((imagingdb.ATT) Is Not Null) AND ((imagingdb.ACQ) Is Not Null) AND ((imagingdb.Project) Is Not Null))
  6. GROUP BY imagingdb.Scheduled, imagingdb.ATT, imagingdb.ACQ
  7. PIVOT imagingdb.Project;
It works if I type the date range Between 4/1/2007 And 4/30/2007 but I want to give the user a form and let them type in the range. I tryed the Between [Enter Beginning Date] And [Enter Ending Date] and I tryed a form for the date but to no avail.

Any help would be appreciated

n your crosstab query (query design grid) enter yr parameters in criteria for example: Between [Enter Beginning Date] And [Enter Ending Date]

Then select Parameters option from Query Menu and enter same for example: [Enter Beginning Date] And [Enter Ending Date] in data field u can type date and it will work.

If u are using a form to supply parameters then that would be same for example : [Forms]![Form1]![startdate] ^ [Forms]![Form1]![enddate]
J
May 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.