Editing default value

  • Thread starter Thread starter khers Field
  • Start date Start date
K

khers Field

I have a database that has three fields A, B, and C
normally field C is calculated to A+B but from time to time I need to
put the value of C manually. How do I tell access to give C a default
value of A+B but give me the posibility to edit this value?
 
Khers,
The DefaultValue doesn't restrict you from overriding that C value. Any
"bound" field will allow you to override the default value that was inserted
when that record was created.

DefaultValue only activates on "New" records. So, I don't think you'll
have success with setting Field C's DefaultValue to A+B. At the time the
new record is opened, there is no value in A or B... so C would capture Null
as the default value.

To Keep C in synch with A and B, you'll have to use the AfterUpdate event
of both A and B to run this code...
[C] = [A] +

hth
Al Camp
 
Back
Top