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

Form, subform, sub-sub form?

Let' say we have an application for a production facility running 24/7
broken into 3 shifts 6-2,2-10,10-6

each production report date contains 3 shifts as above

in each shift there can be from one to several different product runs (the
average is about 4) but it could be more or less - it's not defined or
definite for many reasons

Then, for each run there is a production report of product, good pieces,
bad pieces total run time for that product etc. etc.

then for each run there is a list for # of rejects and reject code

SO I have ProductionRuns with rejects subform 1 to many but this results in
repeated entries of shift, date, time. So i could make a main table for
these and have the production run as a subform to this, but then I have a
subform to the prodution run form.

This gets confusing and requires me to put buttons for starting new date or
shift. Any better way of doing this?

Nov 12 '05 #1
2 2927
Without knowing the structure of your data, it would seem to me that you
would have a form with production run as the record... with a selection of
Date and Shift in the Form Header. Within that production run, same-level
but separate subforms for regular production information and reject
information.

Using Combo or List Boxes in the header to select date and shift, then
replacing the RecordSource with an SQL statement using date and shift as
criteria would limit the production runs to that particular date/shift. Or,
if you'd rather, use a calendar control to select the date.

If there's something about your data so this doesn't seem logical, follow up
with clarification. I may not see it, but surely someone will have a
suggestion.

Larry Linson
Microsoft Access MVP

"Claude" <Cl***********@quickpic.net> wrote in message
news:KySic.32795$aQ6.1714744@attbi_s51...
Let' say we have an application for a production facility running 24/7
broken into 3 shifts 6-2,2-10,10-6

each production report date contains 3 shifts as above

in each shift there can be from one to several different product runs (the
average is about 4) but it could be more or less - it's not defined or
definite for many reasons

Then, for each run there is a production report of product, good pieces,
bad pieces total run time for that product etc. etc.

then for each run there is a list for # of rejects and reject code

SO I have ProductionRuns with rejects subform 1 to many but this results in repeated entries of shift, date, time. So i could make a main table for
these and have the production run as a subform to this, but then I have a
subform to the prodution run form.

This gets confusing and requires me to put buttons for starting new date or shift. Any better way of doing this?

Nov 12 '05 #2
Hi Claude,

I'd try one main form, and have 4 (or more) *cascading* subforms on it.
These subforms *could* be on seperate pages of a tab control if nessecary.

Main form ("frmProductionDate") has the production date info.(ShiftDate,
Plant, etc)
First subform: "sbfShifts" -- (ShiftDate, ShiftNumber, StartTime, EndTime,
etc)
Second subform: "sbfProductionRuns" (ShiftNumber, RunNumber, StartRun,
EndRun, etc.)
Third subform: "sbfProducts" (RunNumber, ProductNumber, ProductDescription)
Fourth subform: "sbfProductResults" (ProductNumber,
UnitsProduced,UnitsRejected, RejectCode, etc)

Each form or subform above should be bound to it's own table, with
one-to-many links defined.
Use an unbound textbox to retreive the unique ID for each subform, then use
that textbox as the LinkMaster for the subform (hierachly) below it.

i.e. "txtShiftNumber" textbox control with
"=Me![sbfShifts].Form![ShiftNumber]" as it's control source, which is then
used as the Link Master, and "ShiftNumber" as the LinkChild for the
"sbfProductionRuns" subform. Repeat this procedure as nessecary for the rest
of the subforms.

If this is all set up correctly:
1.) Choosing a date on the main form will display a list of shifts for that
day in "sbfShifts", with the record pointer on the first of 3 records
2.) sbfProductionRuns will display ALL the runs that occured during the
selected shift. Selecting a different shift in sbfShifts will cause
sbfProductionRuns to show Production runs for that shift....
3.) ...and so on, and so on for each of the subforms beneath, in a cascading
fashion.
4.) These suforms can be used for viewing AND for entering new data, which
make this approach quite flexible.
5.) Data can be summarized at each subform level... summed, counted,
percentages calculated, etc. This can be done by inserting calculated
controls in each of the subforms form footers, then referencing those form
footer controls from other controls on the main form.

Other considerations:
Is it possible that there may be several RejectCodes for the same product,
during the same production run?
If so you may need another subform, and even a way to identify
(sequentiallly) each item that came off the production line.

Clear as mud, right? :)

--
HTH,
Don
=============================
Use My*****@Telus.Net for e-mail
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)

I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.

Do Until SinksIn = True
File/Save, <slam fingers in desk drawer>
Loop

================================
"Claude" <Cl***********@quickpic.net> wrote in message
news:KySic.32795$aQ6.1714744@attbi_s51...
Let' say we have an application for a production facility running 24/7
broken into 3 shifts 6-2,2-10,10-6

each production report date contains 3 shifts as above

in each shift there can be from one to several different product runs (the
average is about 4) but it could be more or less - it's not defined or
definite for many reasons

Then, for each run there is a production report of product, good pieces,
bad pieces total run time for that product etc. etc.

then for each run there is a list for # of rejects and reject code

SO I have ProductionRuns with rejects subform 1 to many but this results in repeated entries of shift, date, time. So i could make a main table for
these and have the production run as a subform to this, but then I have a
subform to the prodution run form.

This gets confusing and requires me to put buttons for starting new date or shift. Any better way of doing this?

Nov 12 '05 #3

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

Similar topics

0
by: Deano | last post by:
If I create 2 or more records in my subform and I then delete the main record, then all the controls on my subform disappear. Yet if there is only one record in the subform then it gets deleted...
4
by: Deano | last post by:
If I create 2 or more records in my subform and I then delete the main record, then all the controls on my subform disappear. Yet if there is only one record in the subform then it gets deleted...
8
by: PeteCresswell | last post by:
I'm looking for some code that makes a list presented in a subform autoscroll in response to the user typing - like a combo box dropdown or a regular ListBox does. I.e. The user is looking at...
1
by: (Pete Cresswell) | last post by:
I'm using a subform as a navigation list. On the left side of the screen is a subform containing people's names. The right side of the screen is loaded with information about the...
2
by: manning_news | last post by:
Using A2K. I've got a database with client info and each client has a subform which contains types of income and the amount they each receive. The record source of the subform is a cartesian...
9
by: robert d via AccessMonster.com | last post by:
I'm not sure why the following isn't working. The subform loads correctly, but no data is displayed. I'm certain that there is data and I have checked that the SQL statement does in fact return...
1
by: planetthoughtful | last post by:
Hi All, I have a mainform with a subform in which I show some task summary data. On the mainform I have a number of unbound controls that reflect values relevant to each task in the subform....
10
by: rdemyan via AccessMonster.com | last post by:
I have a subform that displays around 10 fields. Most of the values shown result from some complex calculations. To make it easy, I have stored the results in a temporary table and then all I...
2
by: John | last post by:
I have a mainform with a subform. The subform is sorted on a specific field and when I just open the subform, the sorting is OK. However, when I open the mainform, the sorting in the subform is...
5
by: John Torres | last post by:
I am trying to link second subform base on the 1st subform. I’ve read several threads and it’s just look too complicated for me (sorry I’m a newbie). I want to link shipping information (2nd...
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: 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
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...
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...
0
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,...

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.