Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / May 2008

Tip: Looking for answers? Try searching our database.

Join two SELECT staements as one recordset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AkAlan - 19 May 2008 19:29 GMT
I have a table (tblQcCdrlSchedule) with the following fields:
DateCdrlDue
DateCdrlSubmittedToAf

I need a simple report which shows how many CDRLS's were submmited in the
quarter (fiscal year starts in Oct) and how many were submitted late

I have made a recordset which shows how many CDRLS where submitted like this:

strSql = "SELECT COUNT(*) as CdrlsSubmitted FROM tblQcCdrlSchedule" _
        & " WHERE DatePart(q, DateAdd(m, 3,DateCdrlSubmittedToAf)) = " &
DatePart("q", DateAdd("m", 3, DatePassedIn)) _
        & " AND DatePart(yyyy,DateAdd(m,3,DateCdrlSubmittedToAf)) = " &
DatePart("yyyy", DateAdd("m", 3, DatePassedIn))

Now I need to comine that with how many were late. I can write the code to
count the late CDRL's but how do I combine the second recordset with the
first to set it as the report recordset?
Sylvain Lafontaine - 20 May 2008 00:55 GMT
It's hard to know what you mean exactly with the verb "combine".  With a
question like this, you should always give us an example of what you really
want to do.

In your case, maybe an UNION ALL query will do the trick but I'm not sure.

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)

>I have a table (tblQcCdrlSchedule) with the following fields:
> DateCdrlDue
[quoted text clipped - 15 lines]
> count the late CDRL's but how do I combine the second recordset with the
> first to set it as the report recordset?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.