Create Form with Numerous simultaneous entries

B

Bill

Obviously I am new to Access! I need to create a form that will
update my database with many entries at the same time:

TableName: MachineAssignments
Fields: Date, Shift, MachineType, MachNo, Operator

Form would look like:

Date:______
Shift:______

MachType: MachNo: Operator:
DBCS 1 entryneeded
CIOS 12 entryneeded
DIOS 3 entryneeded
DIOS 4 entryneeded
MPBC 1 entryneeded
MPBC 2 entryneeded

Update Button

The list of existing machine types and machine numbers would always be
on the form
The person who makes the entries would need to put in the date, the
shift number and the operator names.
When update is selected an entry for each machine type would be made to
the MachineAssignments database like:
Date: Shift: MachType: MachNo: Operator:
1/1/06 3 DBCS 1 John Smith
1/1/06 3 CIOS 12 Dan Jones
1/1/06 3 DIOS 3 Joe WhoEver
Etc

Please help me... learn access
 
A

Al Campagna

Bill,

The basic steps would be...
Create a table (ex. tblDailyMachAssign) that holds the Date and Shift and a DayShiftID
keyfield. (AutoNum - the ONE)
Create a table (ex. tblMachShiftOperators) that holds the Mach, Type, Operator, and a
DayShiftID keyfield. (Long - the MANY)
Create a table (ex. tblMachTypes) that holds all MachTypes and MachNos.
Create a Main (ex. frmDailyMachineAssign) form based on the ONE table
tblDailyMachAssign.
On that form place a continuous subform based on the MANY table tblMachOperators.
Relate the tables tblDailyMachAssign to tblMachShiftOperators, ONE to MANY,
w/Referential Integrity, and w/Cascading.
Relate the Main form to the Sub form, (Parent/Child) = DayShiftID
Place a button in the header of the subform (ex. cmdPopulate). Behind that button will
be code that will take tblMachTypes, and Append each Mach and MachNo value to
tblMachShiftOperators table * forcing each record to use the same DayShiftID value that is
displayed on the frmDailyMachAssign form.*

Your subform should now display all Machs and MachNos with no Operator indicated.
 
B

Bill

thanks for the quick response....but...like I said I am really new at
this....
I created a blank table that holds date and shift and a dayshiftID...
question is how will this table get populated? I will have 3 shifts
for every date:
Date: Shift DayShiftID
1/1/2006 1 ?
1/1/2006 2 ?
1/1/2006 3 ?
1/2/2006 1 ?
1/2/2006 2 ?
1/2/2006 3 ?
etc.

I then created a blank table with no entries (ex.
tblMachShiftOperators) that holds the Mach, Type, Operator, and a
DayShiftID keyfield.... not sure what Long - the MANY means...)

I then created a table that contains all machtypes and Nos but you
never indicate how this table is related to the others or how it is
used....

I'm sorry of I am slow at this...

Again thanks for the quick response


bill
 
A

Al Campagna

Bill,
There should be an individual main record for each shift, each with their own ID, and
their own associated machines and operators.
Later, that data could be reconstructed using the common WorkDate (Don't name your
field [Date]... it's a reserved word in Access).
You'd be able to report by WorkDate and By Shift.
WorkDate Shift ID
--------------------
1/1/06 1 212
(+ subform records)
-----------------------
1/1/06 2 213
(+ subform records)
---------------------
1/1/06 3 214
(+ subform records)
------------------
1/2/06 1 215
(+ subform records)
etc....

If the Main table has an autonumber to generate a DayShiftID, your related table
MachinesShiftOperators will have to have a Long integer field named DayShiftID, so that
the tables can be related. The ONE table autonumber ID to the MANY table long integer ID.
They are related in a One to Many relationship.

tblMachTypes is not related to either table. It is merely a value table used to
generate the Update query, and append the new blank records to each WorkDate/Shift
record's subform. Think of it as a lookup type table.

Your project will be difficult for a beginner to Access. I would suggest that you
build a workable Main form and Subform, with "manual" Mach, MachType, and Operator entry
in the sub to start with. When that works properly and generates the reports you need,
then add the "auto generation" of the multiple Mach records in the subform. You'll have a
better understanding as to how tables are related, and adding the Populate function

To start with, the subform could have a combobox for Mach/MachNo that uses the values
from MachTypes to allow the user to manually select each machine and then enter an
operator name. (given a table tblOperators with all your Operators listed there can be
used to feed an Operator combobox in the sub)

MachCombo MachNo OperatorCombo
ABCD 1 Bob Smith
AJFD 4 Jim Allen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top