Thanks Cliffhanger9,
Normally you would be right. I know the structure is poor. It might even look inefficient. On the other hand, besides my question about how to copy tables, the management remains very simple. This simple solution keeps data that are treated and maneged separately in simple individual two-dimensional tables. If I would use the classical solution of one table and adding fields all the time, I would end up with 90 extra fields per employee each month (or a sophisticated table with many dimensions). As the number of records needed varies a lot from one employee to another (and depends on the number of separate activities per employee/per day) a lot of space would remain empty.
This said, if there is no code for copy and paste, I will find a solution with following code:
Dim tdfTempl as TableDef
Dim tdfNew as Tabledef
Set oMyBD = Workspaces(0).OpenDatabase("DBname.mdb")
Set tdfTempl=oMyDB.TableDefs("TemplateTablename")
Set tdfNew =oMyDB.CreateTableDef("NewTable")
With tdfNew
For i = 0 to tdfTempl.Fields.Count-1
fldname = tdfTempl.Fields(i).Name
fldtype = tdfTempl.Fields(i).Type
fldsize = tdfTempl.Fields(i).Size
.Fields.Append .CreateField _
(fldname,fldtype,fldsize)
Next i
End with
oMyDB.TableDefs.Append tdfNew
I still have to include the right properties per field and am still looking for this code.
Thanks again,
Rudo