Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expression in Default Value

Status
Not open for further replies.

sweetp

Technical User
Jan 9, 2002
35
US
I have:

=DateAdd("y",+[Days_Due_To_Expire],[Date])

in my Control Source of a form and it adds the two controls together fine and shows it on the form.

But to get it to insert into the database, I need to move the expression to Default Value and bind the Control Source to the database field. When I do this, the [Days_Due_To_Expire] doesn't add to the date anymore (I only get the [Date] value to show up in the database.

Any ideas???? I'm pretty new to this expression stuff.

Thanks.
Sweetp

 
Hi!

Anything that can be calculated shouldn't be stored. That is why there isn't any way native to Access that will allow you to do it. If you really do need to store the calculated value then you will need to use VBA to store it. If all you need to do is display the value in a form, report or query then just repeat the calculation whenever you need it.

hth


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top