473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Passing a date range into a crosstab query

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
1 5232
JConsulting
603 Expert 512MB
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

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

Similar topics

2
by: Claus Haslauer | last post by:
Hi, I want to create a crosstab query that looks like this Date | Elevation 1 | Elevation 2 | ... ______________________________________________________________________ Date 1 | xx.y | xx.y...
2
by: david.isaacks | last post by:
I have a table with an as a field with the date/time in it. Formated like "3/20/2006 7:25:00 AM" I want to be able to create a query for just the dates in Feb, March, April, etc.. I do want to...
6
by: delsay | last post by:
I am attempting to create a query that creates a Count for each month and year combo starting in 1992 (Jan 1992, Feb 1992). The field Purchase Date contains dates that are in the Date/Time format. ...
2
by: sixdeuce62 | last post by:
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...
1
by: kappa | last post by:
I have a problem in ALL my queries when I run a specific date range. Access always crashes when I view in Datasheet view. This doesn't occur if it's a parameter query and I am prompted to enter the...
5
by: HowHow | last post by:
First time using crosstab query because tired of creating queries and put them together in one query (such a stupid thing to do :D). Not sure how it works still. I have link table called...
2
by: Jim Devenish | last post by:
I wish to create a crosstab query as the record source for a report. It needs to count data between selected dates which are entered by the user in a popup window. The following Select query...
4
by: rekhasc | last post by:
hi friends.. i am using sql server 2005 reporting services.. in database the table contains startdate row and enddate row... i want the query which display all the contents between these...
6
by: lisacrowe | last post by:
I have a simple database recording complaints. A crosstab query is based on a query which returns resolved complaints only. The crosstab has the field Complaint Type as a row heading and Outcome as a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.