473,394 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

multiple queries with single parameter input

5
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 7271
NeoPa
32,556 Expert Mod 16PB
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
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...
4
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...
1
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...
7
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...
2
by: aishah | last post by:
hi can anyody help me in giving and example of multiple queries and single query.
4
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...
3
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...

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.