473,386 Members | 1,702 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,386 software developers and data experts.

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 12673
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
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...
6
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...
9
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...
1
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...
0
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...
11
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...
1
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...
11
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)...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.