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  

How to set default date format in Access 07



 
 
Thread Tools Display Modes
  #11  
Old March 20th, 2008, 06:13 PM posted to microsoft.public.access.gettingstarted
Klatuu
external usenet poster
 
Posts: 7,074
Default How to set default date format in Access 07

Well, some improvement. You went from a disasterous name to a really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces or any
other special characters. They should have only numbers, letters, and the
underscore character.

Now, check the name of the control on your form the field is bound to.
Unless you changed it since you created the form, it is probably also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not have a "date"
field on it. The only table in it does have a field called "date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the default value
field I typed in Date (), Date(), =Date(0, etc and every time I try to save
the table i get "unknown function 'date' ini validation expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will check the error
when I get back to work and post exactly what it says. This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers into and it
automatically generates the date by using the Now() function, the problem is
the date that it auto inserts has the time after it, for instance 3/20/2008
8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not work, is Now() set up
to always include the time, if so what would be a better function to just
insert today's date? I tried Date() but that didn't work

  #12  
Old March 20th, 2008, 06:21 PM posted to microsoft.public.access.gettingstarted
Nih
external usenet poster
 
Posts: 29
Default How to set default date format in Access 07

Active Customers is the name of the table the date field is located in. I
changed the name of the date field to "creation" so there are no issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and this
form does not have a "date" field. I want the date to be automatically
entered when the user creates a new customer record, that is why I wanted the
auto date function, so the users won't have to continuously enter today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces or any
other special characters. They should have only numbers, letters, and the
underscore character.

Now, check the name of the control on your form the field is bound to.
Unless you changed it since you created the form, it is probably also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not have a "date"
field on it. The only table in it does have a field called "date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the default value
field I typed in Date (), Date(), =Date(0, etc and every time I try to save
the table i get "unknown function 'date' ini validation expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will check the error
when I get back to work and post exactly what it says. This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers into and it
automatically generates the date by using the Now() function, the problem is
the date that it auto inserts has the time after it, for instance 3/20/2008
8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not work, is Now() set up
to always include the time, if so what would be a better function to just
insert today's date? I tried Date() but that didn't work

  #13  
Old March 20th, 2008, 06:26 PM posted to microsoft.public.access.gettingstarted
Klatuu
external usenet poster
 
Posts: 7,074
Default How to set default date format in Access 07

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the default value to
the control as soon as you type any character in any bound control on the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is located in. I
changed the name of the date field to "creation" so there are no issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and this
form does not have a "date" field. I want the date to be automatically
entered when the user creates a new customer record, that is why I wanted the
auto date function, so the users won't have to continuously enter today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces or any
other special characters. They should have only numbers, letters, and the
underscore character.

Now, check the name of the control on your form the field is bound to.
Unless you changed it since you created the form, it is probably also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not have a "date"
field on it. The only table in it does have a field called "date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the default value
field I typed in Date (), Date(), =Date(0, etc and every time I try to save
the table i get "unknown function 'date' ini validation expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will check the error
when I get back to work and post exactly what it says. This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers into and it
automatically generates the date by using the Now() function, the problem is
the date that it auto inserts has the time after it, for instance 3/20/2008
8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not work, is Now() set up
to always include the time, if so what would be a better function to just
insert today's date? I tried Date() but that didn't work

  #14  
Old March 20th, 2008, 06:41 PM posted to microsoft.public.access.gettingstarted
Nih
external usenet poster
 
Posts: 29
Default How to set default date format in Access 07

Ok I understand what you mean. What is the best way to add the field to my
existing form and have it bound to the customer's first name so that when the
user enters a customer name the date appears on the form?

Do I put the =Date() as the default value in the control on the form or in
the properties of the field within the table? Everytime I try to put =Date()
in the default value of the table's field I get that error. I can use =Now()
but like I said that gives me the time as well and I don't want that

"Klatuu" wrote:

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the default value to
the control as soon as you type any character in any bound control on the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is located in. I
changed the name of the date field to "creation" so there are no issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and this
form does not have a "date" field. I want the date to be automatically
entered when the user creates a new customer record, that is why I wanted the
auto date function, so the users won't have to continuously enter today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces or any
other special characters. They should have only numbers, letters, and the
underscore character.

Now, check the name of the control on your form the field is bound to.
Unless you changed it since you created the form, it is probably also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not have a "date"
field on it. The only table in it does have a field called "date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the default value
field I typed in Date (), Date(), =Date(0, etc and every time I try to save
the table i get "unknown function 'date' ini validation expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will check the error
when I get back to work and post exactly what it says. This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers into and it
automatically generates the date by using the Now() function, the problem is
the date that it auto inserts has the time after it, for instance 3/20/2008
8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not work, is Now() set up
to always include the time, if so what would be a better function to just
insert today's date? I tried Date() but that didn't work

  #15  
Old March 20th, 2008, 06:47 PM posted to microsoft.public.access.gettingstarted
Klatuu
external usenet poster
 
Posts: 7,074
Default How to set default date format in Access 07

The Default Value property applies to the control it is set in. You your
case, you have a field in your table you want to populate with the current
date when the record is created. It is or should be bound to a control on
your form. That is the control you put the =Date() in the Default Value
property.

Maybe I confused you. You don't have to type anything into that control.
When you create a new record, you will see only empyt controls.
As soon as you type the first character in ANY control on the form, you will
see the date show up in the control.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Ok I understand what you mean. What is the best way to add the field to my
existing form and have it bound to the customer's first name so that when the
user enters a customer name the date appears on the form?

Do I put the =Date() as the default value in the control on the form or in
the properties of the field within the table? Everytime I try to put =Date()
in the default value of the table's field I get that error. I can use =Now()
but like I said that gives me the time as well and I don't want that

"Klatuu" wrote:

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the default value to
the control as soon as you type any character in any bound control on the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is located in. I
changed the name of the date field to "creation" so there are no issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and this
form does not have a "date" field. I want the date to be automatically
entered when the user creates a new customer record, that is why I wanted the
auto date function, so the users won't have to continuously enter today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces or any
other special characters. They should have only numbers, letters, and the
underscore character.

Now, check the name of the control on your form the field is bound to.
Unless you changed it since you created the form, it is probably also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not have a "date"
field on it. The only table in it does have a field called "date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the default value
field I typed in Date (), Date(), =Date(0, etc and every time I try to save
the table i get "unknown function 'date' ini validation expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will check the error
when I get back to work and post exactly what it says. This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers into and it
automatically generates the date by using the Now() function, the problem is
the date that it auto inserts has the time after it, for instance 3/20/2008
8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not work, is Now() set up
to always include the time, if so what would be a better function to just
insert today's date? I tried Date() but that didn't work

  #16  
Old March 20th, 2008, 06:47 PM posted to microsoft.public.access.gettingstarted
Nih
external usenet poster
 
Posts: 29
Default How to set default date format in Access 07

I created the control on the form and just like the table if I put =Now() in
the default value it will give new records the correct date (with time) but
if I put =Date() in the control I get #Name?.

I really think Access 07 has a problem with that =Date() function

"Nih" wrote:

Ok I understand what you mean. What is the best way to add the field to my
existing form and have it bound to the customer's first name so that when the
user enters a customer name the date appears on the form?

Do I put the =Date() as the default value in the control on the form or in
the properties of the field within the table? Everytime I try to put =Date()
in the default value of the table's field I get that error. I can use =Now()
but like I said that gives me the time as well and I don't want that

"Klatuu" wrote:

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the default value to
the control as soon as you type any character in any bound control on the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is located in. I
changed the name of the date field to "creation" so there are no issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and this
form does not have a "date" field. I want the date to be automatically
entered when the user creates a new customer record, that is why I wanted the
auto date function, so the users won't have to continuously enter today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces or any
other special characters. They should have only numbers, letters, and the
underscore character.

Now, check the name of the control on your form the field is bound to.
Unless you changed it since you created the form, it is probably also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not have a "date"
field on it. The only table in it does have a field called "date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the default value
field I typed in Date (), Date(), =Date(0, etc and every time I try to save
the table i get "unknown function 'date' ini validation expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will check the error
when I get back to work and post exactly what it says. This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers into and it
automatically generates the date by using the Now() function, the problem is
the date that it auto inserts has the time after it, for instance 3/20/2008
8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not work, is Now() set up
to always include the time, if so what would be a better function to just
insert today's date? I tried Date() but that didn't work

  #17  
Old March 20th, 2008, 06:50 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default How to set default date format in Access 07

Did you check the References collection, like Evi suggested?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Nih" wrote in message
...
I created the control on the form and just like the table if I put =Now()
in
the default value it will give new records the correct date (with time)
but
if I put =Date() in the control I get #Name?.

I really think Access 07 has a problem with that =Date() function

"Nih" wrote:

Ok I understand what you mean. What is the best way to add the field to
my
existing form and have it bound to the customer's first name so that when
the
user enters a customer name the date appears on the form?

Do I put the =Date() as the default value in the control on the form or
in
the properties of the field within the table? Everytime I try to put
=Date()
in the default value of the table's field I get that error. I can use
=Now()
but like I said that gives me the time as well and I don't want that

"Klatuu" wrote:

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the default
value to
the control as soon as you type any character in any bound control on
the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is located
in. I
changed the name of the date field to "creation" so there are no
issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and
this
form does not have a "date" field. I want the date to be
automatically
entered when the user creates a new customer record, that is why I
wanted the
auto date function, so the users won't have to continuously enter
today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a
really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces
or any
other special characters. They should have only numbers, letters,
and the
underscore character.

Now, check the name of the control on your form the field is bound
to.
Unless you changed it since you created the form, it is probably
also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if
that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not
have a "date"
field on it. The only table in it does have a field called
"date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the
default value
field I typed in Date (), Date(), =Date(0, etc and every time I
try to save
the table i get "unknown function 'date' ini validation
expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in
your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will
check the error
when I get back to work and post exactly what it says.
This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers
into and it
automatically generates the date by using the Now()
function, the problem is
the date that it auto inserts has the time after it,
for instance 3/20/2008
8:35AM. How do I get this to only show the date ie
3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not
work, is Now() set up
to always include the time, if so what would be a
better function to just
insert today's date? I tried Date() but that didn't
work



  #18  
Old March 20th, 2008, 07:06 PM posted to microsoft.public.access.gettingstarted
Nih
external usenet poster
 
Posts: 29
Default How to set default date format in Access 07

I actually don't see the "references" option anywhere. the toolbars in 07
are different, where would I find this option in 07?

"Douglas J. Steele" wrote:

Did you check the References collection, like Evi suggested?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Nih" wrote in message
...
I created the control on the form and just like the table if I put =Now()
in
the default value it will give new records the correct date (with time)
but
if I put =Date() in the control I get #Name?.

I really think Access 07 has a problem with that =Date() function

"Nih" wrote:

Ok I understand what you mean. What is the best way to add the field to
my
existing form and have it bound to the customer's first name so that when
the
user enters a customer name the date appears on the form?

Do I put the =Date() as the default value in the control on the form or
in
the properties of the field within the table? Everytime I try to put
=Date()
in the default value of the table's field I get that error. I can use
=Now()
but like I said that gives me the time as well and I don't want that

"Klatuu" wrote:

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the default
value to
the control as soon as you type any character in any bound control on
the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is located
in. I
changed the name of the date field to "creation" so there are no
issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and
this
form does not have a "date" field. I want the date to be
automatically
entered when the user creates a new customer record, that is why I
wanted the
auto date function, so the users won't have to continuously enter
today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a
really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces
or any
other special characters. They should have only numbers, letters,
and the
underscore character.

Now, check the name of the control on your form the field is bound
to.
Unless you changed it since you created the form, it is probably
also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if
that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not
have a "date"
field on it. The only table in it does have a field called
"date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the
default value
field I typed in Date (), Date(), =Date(0, etc and every time I
try to save
the table i get "unknown function 'date' ini validation
expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in
your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will
check the error
when I get back to work and post exactly what it says.
This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers
into and it
automatically generates the date by using the Now()
function, the problem is
the date that it auto inserts has the time after it,
for instance 3/20/2008
8:35AM. How do I get this to only show the date ie
3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not
work, is Now() set up
to always include the time, if so what would be a
better function to just
insert today's date? I tried Date() but that didn't
work




  #19  
Old March 20th, 2008, 07:15 PM posted to microsoft.public.access.gettingstarted
Nih
external usenet poster
 
Posts: 29
Default How to set default date format in Access 07

I found the references section and it did show something MISSING, it refered
to some kind of utility. I cleared the checkbox and GASP it appears to be
working.

Thank you so much everyone for your help.

"Nih" wrote:

I actually don't see the "references" option anywhere. the toolbars in 07
are different, where would I find this option in 07?

"Douglas J. Steele" wrote:

Did you check the References collection, like Evi suggested?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Nih" wrote in message
...
I created the control on the form and just like the table if I put =Now()
in
the default value it will give new records the correct date (with time)
but
if I put =Date() in the control I get #Name?.

I really think Access 07 has a problem with that =Date() function

"Nih" wrote:

Ok I understand what you mean. What is the best way to add the field to
my
existing form and have it bound to the customer's first name so that when
the
user enters a customer name the date appears on the form?

Do I put the =Date() as the default value in the control on the form or
in
the properties of the field within the table? Everytime I try to put
=Date()
in the default value of the table's field I get that error. I can use
=Now()
but like I said that gives me the time as well and I don't want that

"Klatuu" wrote:

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the default
value to
the control as soon as you type any character in any bound control on
the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is located
in. I
changed the name of the date field to "creation" so there are no
issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info in and
this
form does not have a "date" field. I want the date to be
automatically
entered when the user creates a new customer record, that is why I
wanted the
auto date function, so the users won't have to continuously enter
today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to a
really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have spaces
or any
other special characters. They should have only numbers, letters,
and the
underscore character.

Now, check the name of the control on your form the field is bound
to.
Unless you changed it since you created the form, it is probably
also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to see if
that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form does not
have a "date"
field on it. The only table in it does have a field called
"date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date, in the
default value
field I typed in Date (), Date(), =Date(0, etc and every time I
try to save
the table i get "unknown function 'date' ini validation
expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or anything in
your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I will
check the error
when I get back to work and post exactly what it says.
This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new customers
into and it
automatically generates the date by using the Now()
function, the problem is
the date that it auto inserts has the time after it,
for instance 3/20/2008
8:35AM. How do I get this to only show the date ie
3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they do not
work, is Now() set up
to always include the time, if so what would be a
better function to just
insert today's date? I tried Date() but that didn't
work




  #20  
Old March 20th, 2008, 09:36 PM posted to microsoft.public.access.gettingstarted
Evi
external usenet poster
 
Posts: 898
Default How to set default date format in Access 07

Ulp! you cleared the check box?? I don't think that is what you should have
done that. it's like throwing away your fire alarm because its beeping.
You need to find the missing file (s) and add it/them (unless they have
reappeared by themselves).
It sounds harder than it is, they may be in the list already and when they
are ticked will simply be added when you close and re-open the list.

if not we can tell you how to find them and, if necessary, re-register them.
it is all fixable.

If you look on
http://allenbrowne.com/ser-38.html
Allen has a list of the references you ought to see in Acc2007. Add them if
they aren't there and ensure they are in the order he gives.
For me the one that seemed to screw up Date() was, if I remember correctly,
not having Microsoft DAO 3.6

BTW, to put a Default Value in your Table, you shouldn't need the =Date()
(unless Acc2007 is different)
Just type
Date()
next to Default Value in Table Design.
to get that Default value into your table.

Evi





"Nih" wrote in message
...
I found the references section and it did show something MISSING, it

refered
to some kind of utility. I cleared the checkbox and GASP it appears to be
working.

Thank you so much everyone for your help.

"Nih" wrote:

I actually don't see the "references" option anywhere. the toolbars in

07
are different, where would I find this option in 07?

"Douglas J. Steele" wrote:

Did you check the References collection, like Evi suggested?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Nih" wrote in message
...
I created the control on the form and just like the table if I put

=Now()
in
the default value it will give new records the correct date (with

time)
but
if I put =Date() in the control I get #Name?.

I really think Access 07 has a problem with that =Date() function

"Nih" wrote:

Ok I understand what you mean. What is the best way to add the

field to
my
existing form and have it bound to the customer's first name so

that when
the
user enters a customer name the date appears on the form?

Do I put the =Date() as the default value in the control on the

form or
in
the properties of the field within the table? Everytime I try to

put
=Date()
in the default value of the table's field I get that error. I can

use
=Now()
but like I said that gives me the time as well and I don't want

that

"Klatuu" wrote:

That is exactly what the DefaultValue property of a control does.
When you create a new record, it automatically assigns the

default
value to
the control as soon as you type any character in any bound

control on
the
form.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

Active Customers is the name of the table the date field is

located
in. I
changed the name of the date field to "creation" so there are

no
issues with
spaces or reserved names.

There is only 1 form which is used to enter new customer info

in and
this
form does not have a "date" field. I want the date to be
automatically
entered when the user creates a new customer record, that is

why I
wanted the
auto date function, so the users won't have to continuously

enter
today's
date.

"Klatuu" wrote:

Well, some improvement. You went from a disasterous name to

a
really bad name.

First, you were using a reserved word as a name - Date
That will confuse Access

Now you have a name with spaces in it. Names should not have

spaces
or any
other special characters. They should have only numbers,

letters,
and the
underscore character.

Now, check the name of the control on your form the field is

bound
to.
Unless you changed it since you created the form, it is

probably
also named
Date. Change that as well.

What is
Active.Customers.date ?


Then in the DefaultValue property it should be
=Date()
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I also changed the date field's name to "customer date" to

see if
that fixed
it...it didn't

"Nih" wrote:

It is a very small database with 1 form and this form

does not
have a "date"
field on it. The only table in it does have a field

called
"date" which is
the field I want Access to autofill with today's date.

I go to the design view of the table and click on date,

in the
default value
field I typed in Date (), Date(), =Date(0, etc and every

time I
try to save
the table i get "unknown function 'date' ini validation
expression or default
value on 'Active.Customers.date".

"Klatuu" wrote:

It is valid.
What error did your get?
Where did you get it?
Do you have any field, control, form, report or

anything in
your database
named Date?

More info gets better answers.
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:


I tried Date() before but Access gave me an error. I

will
check the error
when I get back to work and post exactly what it

says.
This is Access 07, is
Date() no longer valid on that version?


"Klatuu" wrote:

use Date()
Date() includes only the date
Now() includes date and time
And, would you believe
Time() returns only the time
--
Dave Hargis, Microsoft Access MVP


"Nih" wrote:

I have an Access form that my users enter new

customers
into and it
automatically generates the date by using the

Now()
function, the problem is
the date that it auto inserts has the time after

it,
for instance 3/20/2008
8:35AM. How do I get this to only show the date

ie
3/20/2008 and cut the
timestamp off?

I have tried filters on the date field but they

do not
work, is Now() set up
to always include the time, if so what would be a
better function to just
insert today's date? I tried Date() but that

didn't
work





 




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


All times are GMT +1. The time now is 03:00 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.