Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 16th, 2005, 12:48 PM
JamesMBC JamesMBC is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 6 JamesMBC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 59 sec
Reputation Power: 0
Combing two queries?

OK. I am setting up some marketing information at work. What I have is a query that will display all the data gathered between x and y, with x and y as user defined dates. So far so wonderful. What I need is to display a comparison of that data between x and y and two more user defined dates, a and b. Now, I could simply run the between query twice and print out the results but that seems inelegant. Because the data are of a wide range of types, I can't simply create queries for each type of data and put them in a report together as Access can't, not unfairly, connect the queries.

If you think I need to learn VBA or SQL then just say and I'll go and cry for a bit then get on with learning it, but if anyone can think of a way of doing it purely within Access I'd be very grateful to know.

Reply With Quote
  #2  
Old March 17th, 2005, 02:12 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
Hey James!

Start crying baby....you need SQL. Maybe this can be done on Access (I don't quite know), but SQL rocks and you should consider learning. Now, I have a question: the fields you're returnin in both queries....are they the same? If so, you could simply do
query1 union query2. That would return the two queries in one with the info you need.

If you need a thing with parameters, why not create a store procedure in access (if that's posible). You would have the queries accepting parameters and can print out the report for any date the user enters!!

Good Luck!

Anibal.

IF that's not what you asked...please, explain yourself a little bit more with an example!!

Reply With Quote
  #3  
Old March 17th, 2005, 03:02 PM
damere damere is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 6 damere User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 41 m 55 sec
Reputation Power: 0
actually, go to this link, and download some of the example query/forms/reports/code. i believe i remember seeing something about sub queries that fit this question

http://www.microsoft.com/downloads/...&DisplayLang=en

Reply With Quote
  #4  
Old March 18th, 2005, 04:37 AM
JamesMBC JamesMBC is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 6 JamesMBC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 59 sec
Reputation Power: 0
Yeah, the fields from the queries are identical, when I get them set up. Ill try a union and lay my hands on SQL for dummies. Thanmks for the link, Ill have to try that when I get home.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Combing two queries?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT