W
Woody
I think Access is a great product and I look forward to working with it. I
am not new to database design but I am still getting up to speed on Access
proper. Thank you for whatever help you can give me.
I understand normalization issues but in this case I want to store a
calculated value in a real field in the master table of a 1 to many form.
That is: Lets say I have an form called Invoices; a master/child form. In
the master area I have the Name of a client and address etc.
In the detail area (a grid) Lets say I have 3 rows of items purchased. Each
item has an Amount column with a value of 10.00 in it. To do what I want I
need a calculated column titled TotalAmount that shows 30.00 in it,
underneath the Amount column of the grid. As the user moves from row to row
in the grid and changes values in the Amount column of each row, the
TotalAmount field should calculate automatically. But, in addition, I would
like to have a real field called InvTotal in the top or master area of the
form that gets be updated too; updated with a real number (equal to the
"TotalAmount" calculated field) whose value I will save to the database when
saving the form.
I don't understand as yet how this kind of thing is done in Access. I can
write code, but if this requires code, I'm not sure where (what event) to put
it in. Also, it is not clear to me if the Calculated TotalAmount field
should be part of the detail table (the grid) or should it be a field outside
the grid in the master, but under the Amount field of the grid.
Is there a white paper or something like that somewhere that would walk me
through this?
am not new to database design but I am still getting up to speed on Access
proper. Thank you for whatever help you can give me.
I understand normalization issues but in this case I want to store a
calculated value in a real field in the master table of a 1 to many form.
That is: Lets say I have an form called Invoices; a master/child form. In
the master area I have the Name of a client and address etc.
In the detail area (a grid) Lets say I have 3 rows of items purchased. Each
item has an Amount column with a value of 10.00 in it. To do what I want I
need a calculated column titled TotalAmount that shows 30.00 in it,
underneath the Amount column of the grid. As the user moves from row to row
in the grid and changes values in the Amount column of each row, the
TotalAmount field should calculate automatically. But, in addition, I would
like to have a real field called InvTotal in the top or master area of the
form that gets be updated too; updated with a real number (equal to the
"TotalAmount" calculated field) whose value I will save to the database when
saving the form.
I don't understand as yet how this kind of thing is done in Access. I can
write code, but if this requires code, I'm not sure where (what event) to put
it in. Also, it is not clear to me if the Calculated TotalAmount field
should be part of the detail table (the grid) or should it be a field outside
the grid in the master, but under the Amount field of the grid.
Is there a white paper or something like that somewhere that would walk me
through this?