Think it best to step through the procedures with a new start sample:
1-new database, open in table design
2-enter FieldName 'PassExp', DataType 'Date/Time'
3-enter FieldName 'DaysLeft', DataType 'Number'
4-enter FieldName 'Today', DataType 'Date/Time'
~~~~save as 'Practice' and close~~~~
1-Change to FormDesign and insert all fields
2-select 'DaysLeft' box, and in 'Properties/Data/Default Value
"=Date()-[PassExp]"
3-select 'Today' box, and in 'Properties/Data/Default Value "=Date()"
4-Save and close FormDesign. Open in 'Form', enter date in "PassExp'
results in no calculation in "DaysLeft". The "Today" box shows current date.
Changing formulation to 'DateDiff' using the 'Today' info doesn't do
anything either.
So, I'm guessing I'm putting something in the wrong place.
Exactly.
You're putting a CALCULATION - DaysLeft - in a TABLE.
Tables should contain static data.
Calculations must be done in Queries, in the Control Source of a
textbox on a form or report, or in code.
The field DaysLeft *should not exist in your table*.
Unless you want it to permanently record the date upon which a record
was created, the field Today should not exist either.
If you want to SEE today's date and the number of days left on a Form,
simply store the field PassExp in a table (along with other non-date
related fields, presumably).
on a Form based on this table put a textbox (labeled Days Left) with a
control source
= DateDiff("d", Date(), [PassExp])
This number of days left will not be stored anywhere in your table, or
anywhere else - but it's not *NEEDED* to store it. You can calculate
it whenever it's needed, using the date that the calculation is being
done, whatever that date might be.
You may be assuming that information must be stored in a Table in
order to be of any use. That assumption is WRONG and is apparently the
basis of your confusion.
John W. Vinson[MVP]