Create

  • Thread starter Thread starter fh217
  • Start date Start date
F

fh217

Hi,

I have an employee job time data entry application that uses 2 tables of
data imported from a mainframe.
The first table is a 'Master' containing the Employee Number (key), Name,
ect. The second table is a
'Job/Time' containing the Employee Number and Job Number as the key, Time,
ect. Each employee has
20 records in the Job/Time table ( each job is an individual record ). What
I would like to do is import just
the 'Master' file from the mainframe and generate the 'Job/Time' table from
a template table in my application.
Would this be possible in a query? Currently the application does not allow
new employees to be added,
I would also need to add a set of records from the 'Job/Time' template each
time a new employee is added.
I appreciate your help and thank you.
 
Sounds like you have to repeat this "subform pre-poulation" process often? And, after
the Main table has been imported, you want to fill the subform table with 20 "default"
type records?

OK, just import the Main table from the mainframe.
Create the new JobTime empty table to receive the 20 records.
Create an append query that appends just one record for each employee (with your
default values), test it, and when that works... delete all you appends form the subform
new JobTime table. (we're only doing this to make sure the append is OK before we do the
"real" 20 record append)

Create a tblCounter with just one numeric field (Counter), and fill in records numbered
1 to 20.

Add this table to your Append query *with no connection between the subform table and
the Counter table.* This will create a Cartesian realtionship that causes every subform
record to multiply by 20.
Preview the query... you'll see that each subform record now has 20 iterations.
Now, run the append query. It should develop 20 default records for each unique ID.

This is similar to how multiple copies of one label can be generated. One Record vs
the Counter value, delivers that Counter amount of copies of the same label.

I have a file on my website below that demonstrates that multiple copy labels, using a
Cartesian realtionship. It may help you get a a look at how the Cartesian realtionship
works.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Back
Top