I'm creating a simple one table database. The table has only three fields (name, start date, end date). My question is can I have the end date calculate whatever the start dates is plus 90 days automatically within the table?
No.
You cannot have calculated fields in a table. You do calculation in queries and if End Date is always 90 days after the start date then you dont need the field anyway as you can work it out on the fly in a query
EndDate:[start date] + 90
Tip:- Don't leave spaces in field names, they make life harder when the DB gets more complicated (and it will ) use StartDate rather than start date
I'm creating a simple one table database. The table has only three fields (name, start date, end date). My question is can I have the end date calculate whatever the start dates is plus 90 days automatically within the table?
I'm going to slightly disagree with Bat. Its not that you cannot have calculated fields in a table its that you SHOULD not. Storing calculated values can violate normalization and is usually unnecessary. As Bat said you can display the end date any time using the expression he gave you. You can also use the DateAdd function if you want to add 3 months instead of 90 days.
I also agree on his point about spaces in names. But also fields should be as small a piece of data as practical. Name is a reserved woird in Access so shouldn't be used for an object name. People names should be broken out into at least first and last names. Generally I use 5 fields for a name:
thanks for the info. I normally use and underscore sign with my fields. such as date_end. I didn't add that on my original post, because I didn't think it was important. I am always looking for better ways to name by fields, so the 5 character limit that you use is something that i will start doing.