Expression as default field value

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

In an access table is it possible to have the default value of a field an
expression based on values from other fields in the table?

Thanks

Regards
 
John said:
In an access table is it possible to have the default value of a field
an expression based on values from other fields in the table?

No, you can't do that. Access assigns the default value too early.

You will notice that the default values appear in the new record row before
you start entering any other fields. Therefore you cannot set up the Default
Value propety so that it depends on what you enter in other fields.

Use the AfterUpdate event procedure of a text box on a form (in datasheet
view if you want it to look like a table.) Tables are just for storing data.
Forms provide the power you need for the interface.
 
Back
Top