Expression as default field value

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
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top