A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculating number of days



 
 
Thread Tools Display Modes
  #1  
Old November 29th, 2005, 02:15 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Calculating number of days

I have fields Date obtained and date (today) and I'm having difficulty geting
the field days [date] - [date Obtained] to work
I put [date] - [date Obtained] in Default Value
Saving error : The database engine does not recognize either the field
'date' in a validation expression, or the default value in the table 'Table1'
  #2  
Old November 29th, 2005, 02:34 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Calculating number of days

Look under help for the function datediff("d", [date1],[date2]) this is the
function you are looking for

if the 'default value' is in a form you will use the formula above. If you
are trying to store this in a database, you most likely don't want to save
the calculated value.

Ed Warren.

"crybicki" wrote in message
...
I have fields Date obtained and date (today) and I'm having difficulty
geting
the field days [date] - [date Obtained] to work
I put [date] - [date Obtained] in Default Value
Saving error : The database engine does not recognize either the field
'date' in a validation expression, or the default value in the table
'Table1'



  #3  
Old November 29th, 2005, 03:38 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Calculating number of days

Thanks Ed
What I need is to show up for how many days we have car in our stock.
So I have Date1 where I put date in short form
We have Date which should show current date in short form, what shoud I put
as default value , CDate?
Chris

"Ed Warren" wrote:

Look under help for the function datediff("d", [date1],[date2]) this is the
function you are looking for

if the 'default value' is in a form you will use the formula above. If you
are trying to store this in a database, you most likely don't want to save
the calculated value.

Ed Warren.

"crybicki" wrote in message
...
I have fields Date obtained and date (today) and I'm having difficulty
geting
the field days [date] - [date Obtained] to work
I put [date] - [date Obtained] in Default Value
Saving error : The database engine does not recognize either the field
'date' in a validation expression, or the default value in the table
'Table1'




  #4  
Old November 29th, 2005, 07:47 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Calculating number of days

If you want to know how many days from date1 to the current date
you want to set the field binding to:
=datediff("d", date1,date()), this will always give you the current number
of days since date1 was entered.

Ed Warren.


"crybicki" wrote in message
...
Thanks Ed
What I need is to show up for how many days we have car in our stock.
So I have Date1 where I put date in short form
We have Date which should show current date in short form, what shoud I
put
as default value , CDate?
Chris

"Ed Warren" wrote:

Look under help for the function datediff("d", [date1],[date2]) this is
the
function you are looking for

if the 'default value' is in a form you will use the formula above. If
you
are trying to store this in a database, you most likely don't want to
save
the calculated value.

Ed Warren.

"crybicki" wrote in message
...
I have fields Date obtained and date (today) and I'm having difficulty
geting
the field days [date] - [date Obtained] to work
I put [date] - [date Obtained] in Default Value
Saving error : The database engine does not recognize either the field
'date' in a validation expression, or the default value in the table
'Table1'






  #5  
Old November 30th, 2005, 03:55 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Calculating number of days

Hi Ed
I'm still geting this error
The database engine does not recognize either the field 'Date1' in a
validation expression, or the default value in the table 'Table1'


"Ed Warren" wrote:

If you want to know how many days from date1 to the current date
you want to set the field binding to:
=datediff("d", date1,date()), this will always give you the current number
of days since date1 was entered.

Ed Warren.


"crybicki" wrote in message
...
Thanks Ed
What I need is to show up for how many days we have car in our stock.
So I have Date1 where I put date in short form
We have Date which should show current date in short form, what shoud I
put
as default value , CDate?
Chris

"Ed Warren" wrote:

Look under help for the function datediff("d", [date1],[date2]) this is
the
function you are looking for

if the 'default value' is in a form you will use the formula above. If
you
are trying to store this in a database, you most likely don't want to
save
the calculated value.

Ed Warren.

"crybicki" wrote in message
...
I have fields Date obtained and date (today) and I'm having difficulty
geting
the field days [date] - [date Obtained] to work
I put [date] - [date Obtained] in Default Value
Saving error : The database engine does not recognize either the field
'date' in a validation expression, or the default value in the table
'Table1'






  #6  
Old November 30th, 2005, 09:34 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Calculating number of days

Then you need to resolve which is giving the problem.

You need to make sure you have appropriate default values (or none) in
table1 and you have a field date1 stored as a date/time in table1
At least one appropriate default for a date/time is now().

Ed Warren.

"crybicki" wrote in message
...
Hi Ed
I'm still geting this error
The database engine does not recognize either the field 'Date1' in a
validation expression, or the default value in the table 'Table1'


"Ed Warren" wrote:

If you want to know how many days from date1 to the current date
you want to set the field binding to:
=datediff("d", date1,date()), this will always give you the current
number
of days since date1 was entered.

Ed Warren.


"crybicki" wrote in message
...
Thanks Ed
What I need is to show up for how many days we have car in our stock.
So I have Date1 where I put date in short form
We have Date which should show current date in short form, what shoud I
put
as default value , CDate?
Chris

"Ed Warren" wrote:

Look under help for the function datediff("d", [date1],[date2]) this
is
the
function you are looking for

if the 'default value' is in a form you will use the formula above.
If
you
are trying to store this in a database, you most likely don't want to
save
the calculated value.

Ed Warren.

"crybicki" wrote in message
...
I have fields Date obtained and date (today) and I'm having
difficulty
geting
the field days [date] - [date Obtained] to work
I put [date] - [date Obtained] in Default Value
Saving error : The database engine does not recognize either the
field
'date' in a validation expression, or the default value in the table
'Table1'








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to append flat file table to two tables Victoriya F via AccessMonster.com Running & Setting Up Queries 11 September 26th, 2005 05:30 PM
Calculate the number days from previous record Douglas Merrill General Discussion 7 June 27th, 2005 01:18 PM
Calculating interest on number of days in the period Ron Worksheet Functions 0 January 18th, 2005 12:59 AM
Caculate Number of days but without the weekend included John Worksheet Functions 2 April 14th, 2004 09:36 AM
calculating number of days between two dates sandy Worksheet Functions 3 September 17th, 2003 04:23 AM


All times are GMT +1. The time now is 08:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.