G
Guest
I am new to Access and am tryng to use the DateDiff function to calculate and
display the number of days between two dates (ExpectedSeparationDate and
DateChecklistPrepared) on a form I've created called DDForm2648. I have read
as much as I can in the posts related ot DateDiff, but I really don't
understand how to do it and would appreciate some help. As I said, I created
a form that has these two dates expressed as time/date fields. I want to add
a third field that calculates and displays the number of days between.
What I have done so far:
1) In the table design view for the form, which is called DDForm2648, I have
inserted a row and called the Field Name 'DateDiff', in the Data Type, I put
'number' (I didn't type in the ' marks). Then in the field properties box, I
clicked in Default Value and then clicked on the button with the three dots.
I then clicked on the little + to the left of functions and then on the
folder beside Built-In Functions, then Date/Time, then DateDiff and then
clicked paste. Then I changed what appeared in the Expression Builder window
to look exactly like this:
DateDiff ("d"[ExpectedSeparationDate],[DateChecklistPrepared])
I then clicked okay. Then I tried to click the save icon but I get the
following message:
The database engine does not recognize either the field
'ExpectedSeparationDate' in a validation expression, or the default value in
the table 'DDForm2648'.
I'm just shooting in the dark here. I have absolutely no clue what I'm
doing, I'm just trying to follow what I've read in other posts, but it's all
very, very confusing. Can someone please give me ...a simple step by simple
step?
Thank you very much.
display the number of days between two dates (ExpectedSeparationDate and
DateChecklistPrepared) on a form I've created called DDForm2648. I have read
as much as I can in the posts related ot DateDiff, but I really don't
understand how to do it and would appreciate some help. As I said, I created
a form that has these two dates expressed as time/date fields. I want to add
a third field that calculates and displays the number of days between.
What I have done so far:
1) In the table design view for the form, which is called DDForm2648, I have
inserted a row and called the Field Name 'DateDiff', in the Data Type, I put
'number' (I didn't type in the ' marks). Then in the field properties box, I
clicked in Default Value and then clicked on the button with the three dots.
I then clicked on the little + to the left of functions and then on the
folder beside Built-In Functions, then Date/Time, then DateDiff and then
clicked paste. Then I changed what appeared in the Expression Builder window
to look exactly like this:
DateDiff ("d"[ExpectedSeparationDate],[DateChecklistPrepared])
I then clicked okay. Then I tried to click the save icon but I get the
following message:
The database engine does not recognize either the field
'ExpectedSeparationDate' in a validation expression, or the default value in
the table 'DDForm2648'.
I'm just shooting in the dark here. I have absolutely no clue what I'm
doing, I'm just trying to follow what I've read in other posts, but it's all
very, very confusing. Can someone please give me ...a simple step by simple
step?
Thank you very much.