473,668 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multiple queries with single parameter input

5 New Member
Hello,
I have a database in Access2003. I have set up several queries that use the parameter entry [Enter serial number, SN:]. Each query produces different outputs from various tables that go into a report. Sometimes, a report calls for more than one query using the same serial number. Is there a way to not require the operator to input that same parameter for every query short of building a hugh query for all the data for that report? For a group of queries, I envision the SN parameter input once to single variable that gets assigned to the parameter. I'll probably need to code this myself but I would not know where to begin as I have never used macros or modules. I've never used these objects in Access.

Thanks.

Tony
Mar 12 '07 #1
1 7319
NeoPa
32,568 Recognized Expert Moderator MVP
There are two ways this is normally done. Both include setting up a form (which would need to be open when the query/report is run) to contain the value replacing the parameter. if we call the form [frmParam] then we know what we're talking about.
  1. The SQL of the query can reference the control from the form directly. Say you had a TextBox control on your form called txtParam, then this would refernced as Forms!frmParam. txtParam (or even Forms("frmParam ").txtParam if preferred).
  2. Within the code of your form there would be code to open the report (or action query) directly. This would be done in such a way as to pass the value of the control as a literal value. This can be done in various ways including recreating the SQL of a query and inserting the value in the relevant position and including passing a WhereCondition for a report.
Mar 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2526
by: JMCN | last post by:
is it possible to export multiple queries into one workbook, having each query as separate worksheet? i cannot specify a range because the records will change on a daily basis as for query size. i tried the following transferspreadsheet method but the database could not find 'TFM$' because it was not a valid parameter. DoCmd.TransferSpreadsheet acExport, 8, "TFM", "C:\Temp\NonCritical.xls", True, "'TFM'!" DoCmd.TransferSpreadsheet...
4
3748
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure and username, password etc will be exactly the same for each server, the only thing that will change is the server name. Idealy I would like to get the server names from a seperate dataset so there could be any number of servers, allthough in...
1
2456
by: Bob Sanderson | last post by:
I am relatively new to PHP and MySQL. This is the first time I've tried to use multiple queries in a single script. I have the following PHP script which gets a Job Number from a search form and generates a web page which displays the record for that job: $username="root"; $password=""; $database="foobar";
7
4724
by: vaiism | last post by:
I am creating a report that outputs the contact information and details about a water treatment plant, and needs to include information about people who work there. If I tie all the information to a single query the report contains a full set of information for the plant for each of the people who work there. If I embed multiple queries into the report, the user has to input the search criteria once for each of the queries that is being...
2
1889
by: aishah | last post by:
hi can anyody help me in giving and example of multiple queries and single query.
4
2556
by: Akhenaten | last post by:
I am currently using enterprise manager to run multiple queries on a single table in a DB. I refresh these queries every few minutes. Due to the huge number of them I was looking for a better way (or should I just say "a way") to manage/save these queries so I can recall them easier/faster for monitoring purposes. Suggestions? TIA.
3
7746
by: Brett Barry: Go Get Geek! | last post by:
Hello, I just started using Access 2007 after using Access 2003 for a long time. I've created all my queries and they work fine. However, either I forgot or it has changed but, how do I create a report based off of multiple queries? I tried using the report wizard using one query. In the Properties sheet of the report, the record source for the report only shows one query. But if I try and add another text box and add the control
2
2385
by: DigiLife | last post by:
Greetings all, I am trying to create a form in access 2007 that will return multiple queries (count). I have an appointment table and based off of the date selection I want a grid similar to "Cheap Tickets" or "Travelocity" to return the day off (count) 1 day after, 2 day after, 1 day before and 2 days before - all counts. The queries work but I can't figure out how to get them on the form. Do I need to create a separate table? I'm stuck.... I...
0
8371
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8889
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...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7391
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...
0
4202
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
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2782
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
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.