Default value

A

Allan Martin

Can a field in an Access 2000 db have a default value
equal to another field that is automatically generated?
Can I use expression builder to accomplish this ...or?
 
G

Graham Mandeno

Hi Allan

No, you can't set this to happen automatically, but you have a couple of
options:

1) In the BeforeUpdate event of your form, you can check to see if the field
is null, and poke the value into it:
If IsNull(Me.Field2) then Me.Field2 = Me.Field1

2) You can use a calculated query expression to use the value from another
field if the field in question is null. For example:
ShipTo: IIf( IsNull( [PhysicalAddress] ), [PostalAddress],
[PhysicalAddress] )
 

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