I am a little confussed as how to do this, was wondering if anyone could help.
I have a 1:M table project to project period (ie, each project can define x amount of periods) for example
Projectid ProjectName
10000 projectOne
10001 ProjectTwo
projectPeriodID Projectid Period From To
1 10000 1 01/01/2007 31/01/2007
2 10000 2 01/02/2007 28/01/2007
3 10000 3 01/03/2007 31/03/2008
4 10001 1 01/01/2007 30/06/2007
5 10001 2 01/07/2007 31/12/2008
each project also has x amount of cost types
CostTypeID CostType
1 Building
2 Furniture
3 Phone
Each project makes a payment to each costtype in each period, which I want to display in a datagrid in
vb from a recordset
I think I need a table linking the project periods to the cost types
ProjectCostID ProjectPeriodID CostTypeID Amount
1 (auto number) 1 (fk) 1(fk) 1200
2 1 2 300
3 1 3 600
4 2 1 1200
5 2 2 300
6 2 3 600
7 3 1 1200
8 3` 2 100
9 3 3 600
Now what I want to do is pick up a recordset to fill in my datagrid, so that it looks like this (below) and so that I can click in a cell in the datagrid and edit it if required. Can anyone tell me how to pick this recordset up; I am not sure of the joins and stuff that I would need? Or if in fact my tables are correct, I would appreciate any feedback
1 2 3 Total
Buildings 1200 12000 12000 36000
Furniture 300 300 100 700
Salary 600 600 600 18000