473,765 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP! Using Multiple Queries

Hello All,

Is it possible to have two different queries using parameters on the
same report?

Thanks.

Trish

Nov 13 '05 #1
4 2288
Trish-

You're question's a little vague, but if you want the results of two
queries in one report, just make reports based on each query and insert
them into another blank report as subreports. If they're using the
same criteria, it's easiest just have the user enter the criteria into
a form and run the report that way. Otherwise, you can have the query
itself prompt for what it needs by doing something like [Enter date:].

If you're talking about combining the results of the two queries or
something, that's a little more situation-specific, and you'll have to
provide more detail.

Hope this helps.

-Josh

Nov 13 '05 #2
Trish-

You're question's a little vague, but if you want the results of two
queries in one report, just make reports based on each query and insert
them into another blank report as subreports. If they're using the
same criteria, it's easiest just have the user enter the criteria into
a form and run the report that way. Otherwise, you can have the query
itself prompt for what it needs by doing something like [Enter date:].

If you're talking about combining the results of the two queries or
something, that's a little more situation-specific, and you'll have to
provide more detail.

Hope this helps.

-Josh

Nov 13 '05 #3
pc****@romehosp ital.org wrote:
Hello All,

Is it possible to have two different queries using parameters on the
same report?

Thanks.

Trish


Yes. You would then set the report's record source using code in the
report's "on open" event, something like:

If SomeCondition = True Then
Me.RecordSource = "qryQuery1"
Else
Me.RecordSource = "qryQuery2"
End If

HTH - Keith.
www.keithwilby.com
Nov 13 '05 #4
Hello Josh,

I want to create two different queries, each with their own parameters,
to compile on a report.

Show table data for only 1 month:
Query 1= Between [Start Date] and [Ending Date]

and on the same report...

Show table data year-to-date
Query 2= Between [Start Date] and [Ending Date]

Is this even possible??? Thanks again!

Trish

PS...I don't have any "true" programming experience

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
7106
by: Geoff Berrow | last post by:
This is puzzling. If I run $sql = "INSERT INTO customer (custid,username,password,title,firstname,lastname,street,towncity,postcode,telno,mobile,email,glasses) VALUES ('$custid','$username','$password','$title','$firstname','$lastname','$street', '$towncity','$postcode','$telno','$mobile','$email','$glasses')";INSERT INTO orders(custid,pid)VALUES('$custid','$pid')";
0
1993
by: Faybert | last post by:
Hello, and Thanks in advance for any light you might shed on my troubles. I'm trying to setup a series of checkboxes, or a checkboxlist to control the results that are shown on a gridview control. I have a column in my database that hold the current status of the items in there. If I used a checkboxlist and populate it with my options, and set the SQL statement on my gridview control to: "SELECT , , , FROM WHERE
5
1308
by: Zeke Zinzul | last post by:
Hi, I am writing a simple graphics program to generate a Yin Yang logo. I need to implement a flood fill routine and am trying to write a stack class in C#. My main program is in VB. My solution is called "Yin-Yang", containing the two projects. My C# project is called coordstack with a class file in it called stack.cs. This file contains a namespace called "coordstack" and a class, also called
4
2376
by: tarafinlay | last post by:
Hi all, I am new to access and am finding it a bit unintuitive having worked with SQL server in the past... And I am in a bit of a hurry because my employer wants me to crank something out which at first seemed like a piece of cake but I realize now I should have done a little more research before I got started. Here is the issue: I have a table with data relating to our pastry products. I built a form with multiple combo boxes that are...
0
2745
by: joebob8000 | last post by:
This seems like a simple task, but my 6 year old roots in classic ASP must be causing me trouble with my current problem. I am looking to provide a search for users in which they can select multiple categores (check boxes) and view only the results in those categories in a gridView control. My goal is to do so for movies, so an example would be if the user checks comedy and childrens then they would only get childrens comedies and the...
8
3185
by: beretta819 | last post by:
Ok, so I apologize in advance for the wordiness of what follows... (I am not looking for someone to make this for me, but to point me in the right direction for the steps I need to take.) I was nominated at work to design a "system" that would allow us to track the performance of our employees. So I thought Access. Should be simple enough because I have made simple DB's with it before. I was wrong. This has turned into a bigger deal than I...
3
1040
by: pinzasso | last post by:
The second query works fine by itself, so why doesn't it work when the first query is in front of it and the else is triggered? still spits out the print with no errors. <? include("dbconnect.php"); $result = mysql_query("SELECT CTRL_NUM " . "FROM inventory " ."WHERE CTRL_NUM = $_POST "); $res = mysql_fetch_array($result);
0
1342
by: John | last post by:
Hi I have created a drag and drop form a single table using vs2008. I have added several queries to the table adapter in Dataset designer. Is there any way for binding source to use relevant queries separately i.e. for BindingSource.MoveNext to use FillNext/GetDatNext query and BindingSource.MoveNext to use FillPrev/GetDataPrev etc.? Many Thanks
4
2000
by: BigMac4 | last post by:
Ok i am going to sound like the novice i am but i am hoping that someone will take pity on me and help me out. Here is what i am trying to acheive: I have a report that i need to run using a start and end date parameter based on many fields in a query (from a database), i can get it to run ok but because i am trying to look up different details from different fields i have to enter the same two dates about 8 times to run each query. Can i...
0
10156
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9951
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.