Calculate default value based on another field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to build a little database to track auction donations for our
school. I have the following fields (among others):

Declared_Value = the value of the donation
Minimum_Bid = the starting bid value for the donation
Bid_Increment = the amount that each bid must increase

I want to set default values for Minimum_Bid and Bid_Increment based on the
entered value of Declared_Value. However, they can't be 100% calculated
fields b/c there may be some items for which we want to manually overwrite
the values.

My problem is I have no idea how to accomplish this. Do I set the default
in the Table definition? Or do I use the Expression Builder in my Inventory
Entry form?

Thanks in advance for the help!
 
BekkiM said:
I am trying to build a little database to track auction donations for our
school. I have the following fields (among others):

Declared_Value = the value of the donation
Minimum_Bid = the starting bid value for the donation
Bid_Increment = the amount that each bid must increase

I want to set default values for Minimum_Bid and Bid_Increment based on the
entered value of Declared_Value. However, they can't be 100% calculated
fields b/c there may be some items for which we want to manually overwrite
the values.

My problem is I have no idea how to accomplish this. Do I set the default
in the Table definition? Or do I use the Expression Builder in my Inventory
Entry form?

Thanks in advance for the help!

You cannot use a default value that is based on another field because the
default value is assigned before you enter the data into the other field. What
you can do is use the AfterUpdate event of the Declared_Value TextBox to
calculate the "default" for the other fields and push those values into the
other two TextBoxes. Then the user can still over-write them afterwards.
 
Back
Top