|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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!! |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Combing two queries? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|