Writing code in a form

ND1994

New member
Local time
Today, 14:18
Joined
Jan 13, 2005
Messages
6
I have written some expressions that now work fine for several fields in the main form that I use constantly. When someone asked me to print out a table today, I noticed that the fields in the table which are contingent upon formulas created in the properties of my main form are all blank. For instance, in the form, field [Essay Score] is the result of subtracting fields [Total Score] - [Objective Score]. This formula was created in the field properties of my form, but when I look at that field in the related table, it is blank. I assume I am working backwards and should somehow be writing the expressions at the table level and then building the form using that table.

I am not even sure how to build an expression in a table.
 
You can't build expressions in tables as they are only for storing data.

You can delete every field where you are wanting to store a value as it is not necessary. Storing a calculated value breaks the Third Normal Form of database normalisation.

The accepted practice is to save on creating non-key dependencies by using a query to do your calculations. In fact, use queries for everything (forms and reports) instead of tables as queries offer the functionality to select certain data, perform calculations, summarise data, and order data.
 
Tables, queries and forms are not designed with printing in mind, use a Report with your calculations on it
 

Users who are viewing this thread

Back
Top Bottom