Join two SELECT staements as one recordset

  • Thread starter AkAlan via AccessMonster.com
  • Start date
A

AkAlan via AccessMonster.com

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?
 
S

Sylvain Lafontaine

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.
 

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