473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use multiple queries to display information on a form

I am trying to display information in Access on a form that takes
information from many different queries and puts them together on a
spreadsheet or chart.

Some specific info: The information I am displaying consists of a work
order schedule(for the current date), work orders completed , work
orders not completed, a past due schedule, past due completed, and past
due not completed. These are grouped by workcenters. Therefore, one
could see on this chart, on any given day, how many orders are
scheduled, how many past due orders remain, how many scheduled
orders/past due orders have been completed, and how many remain by
workcenter.

So... Scheduled orders = Scheduled complete + Scheduled Not Complete

And

Past Due Orders = Past Due complete + Past Due Not Complete

Currently, I have built a separate query that shows each instance. One
query to show all orders that are scheduled for each workcenter, one
query to show how many scheduled work orders have been completed, etc.,
leading to 6 different queries. Is there a way to combine these
queries into one chart or spreadsheet that I can display on a form???
Hope that made sense.

Thanks,

Matt

Nov 13 '05 #1
3 12701
I have done this kind of thing a number of times with Access. The most
reliable approach is to: For each or your Querys
1) change to a Make Table Query, give some table name and run
2) Make changes to the design of the created table where necessary,
such as, adding a primary key, change default text size to appropriate
value, etc.
3) Change query from a Make Table query to an Append Query (using same
table name)
4) Creat a new query that will delete all records from that same table

when finished, then create a Macro or VB process that will, for each of
your original queries, one at a time:
turn off warnings - as first step of macro.
a) delete any records from the table used by the query
b) run the append quiery to add the latest data to the table
turn on warnings as last step of macro.

Now using your form, display the data you need from the tables, not
from the queries.
Note this process allows you to computer intermediate results (after
data is extraced but before the results are displayed) using data in
the tables in ways that are difficulte/impossible to do using straight
queries.

matthewemic...@ eaton.com wrote:
I am trying to display information in Access on a form that takes
information from many different queries and puts them together on a
spreadsheet or chart.

Some specific info: The information I am displaying consists of a work order schedule(for the current date), work orders completed , work
orders not completed, a past due schedule, past due completed, and past due not completed. These are grouped by workcenters. Therefore, one
could see on this chart, on any given day, how many orders are
scheduled, how many past due orders remain, how many scheduled
orders/past due orders have been completed, and how many remain by
workcenter.

So... Scheduled orders = Scheduled complete + Scheduled Not Complete

And

Past Due Orders = Past Due complete + Past Due Not Complete

Currently, I have built a separate query that shows each instance. One query to show all orders that are scheduled for each workcenter, one
query to show how many scheduled work orders have been completed, etc., leading to 6 different queries. Is there a way to combine these
queries into one chart or spreadsheet that I can display on a form???
Hope that made sense.

Thanks,

Matt


Nov 13 '05 #2
I just tried posting a message and it may have deleted it, so if I am
just repeating what I just said, sorry... anyways, I created the append
queries which append each query into a different table. So now I have 6
different tables all with a "workcenter " column, and each with one extra
column with the specific data it is finding. I created the macro to
delete each table and then append the new data. How do I put this all
together into one table now?? You said to show this all on the form,
however, I am not quite sure what you mean by that. One piece of info:
Each workcenter will not necessarily have information in each query
depending on the schedule.

Thanks,

Matt

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
You have several choices here: - all can achieve the same result.
1) [Elegant] use a UNION query - which can be done in Access but is not
supported by the GUI - to direct the database engine to run serveral
queries and combine the results in a single table. This can be a bit
tricky - I will have to direct you to the HELP Index under UNION
operation for specific details - please note the the first query has to
name all the resulting columns, and you can follow all the queries with
a sort command.
2) Create a single query with a series of left or right outer joins (on
the workcenter column). This is risky because it may work with your
test data - but may inadvertently leave out some data at a future time
because of a missing workcenter
3) [Recommended] Create a new query which does an outer join of just
the workcenter values of all the other tables, Use the properties to
set it to be "unique values" only - then append this to a new table
(cleaned out each time like before) - this table should end up with
every possible workcenter used in each of the other queries - then you
can use an outer join between this table and all of the others tables
to be sure that all of your actual values are included. Create your
Form/Report from this last query - Whether you want to direct the
results of this query to a table first is only a matter of performance.

Nov 13 '05 #4

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

Similar topics

15
7368
by: Jack | last post by:
I have a text file of data in a file (add2db.txt) where the entries are already entered on separate lines in the following form: INSERT INTO `reviews` VALUES("", "Tony's", "Lunch", "Great atmosphere. Good food.", " (Harry Houdini - 03/01/2004)"); INSERT INTO `reviews` VALUES("", "Le Chow Place", "Lunch", "yada yada", " (Herbert Hoover -...
6
6077
by: BlackFireNova | last post by:
Using Access 2002 I am writing a report which draws data from several different tables. I can't link all the tables in a query, as some can not be related without truncating the data. I plan to use sub-queries and sub-reports to filter and display the data in the unrelated tables in my report. The common information is a user-inputed...
9
4337
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my predecessor, I hasten to add) so that each day it creates a copy of the record for each company, changes the date to today's date, and prompts the user...
1
2939
by: Chuck | last post by:
I appreciate any help!!! I have an application that has 4 different forms that display the same information except for the fact that they are fed from 4 different parameter queries. The 4 different forms are activated by 4 different buttons on the main switchboard. Of course, this makes me change 4 different forms when I make a change to...
0
8756
by: MHenry | last post by:
Hi, I know virtually nothing about creating Macros in Access. I would appreciate some help in creating a Macro or Macros that automatically run(s) 14 Queries (three Make Table Queries, and 11 Append Queries) when the Database is first opened, and then again anytime I invoke the Macro (somehow) after the database is already open. The...
11
4504
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked...
1
2236
by: josecruz | last post by:
I have to create a summary report that will provide counts and # average of days for multiple "Status" by entering different dates for every criteria. I have created several queries that calculates the number of days and the counts. I have created the corresponding report to show the sum and verages. But I don't know how to make them print on a...
11
3653
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From...
5
8091
by: Brett | last post by:
Hello, Is it possible to have just one criteria and have it apply to a group of queries? I am trying to create a report with the separate results of 4 queries based on a prompt for the user to input (only once) a date. Is this something that I program into the report? Also, this is related but may require a separate posting, but can I...
0
7410
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...
0
7668
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. ...
0
7773
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...
0
5984
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...
1
5343
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...
0
4960
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...
0
3466
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...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.