entering data in date time field

L

LAF

I have the following problem: When I try to enter data in a date time field
of a new record, I get the following message:

"The value you entered isn't valid for this field. For example, you may
have entered text in a numeric field or a number that is larger than the
FieldSixe setting."

The date time field is mm/dd/yyyy hhnn. I get the message both when I enter
data including the slashes and space, and when I use an input mask.

I had created the date time field using the CDate function on fields month,
day, year, and time, and ran a make table query for the date time field to be
part of the table. For a new record, I got the error message even if I
entered data that was identical to that of any previous record in which the
data in the date time field was accepted.

What's the trick?
 
A

Allen Browne

Sounds like your entry is not being interpreted correctly.

Open the table in design view.
Check that the field is a Date/Time type.
Remove anything in the Format and Input Mask properties of the field (lower
pane.)
Save, and switch the table to datasheet view.
Try entering a value, including the 2 slashes and the colon between the
hours and minutes.
 
J

John Vinson

"The value you entered isn't valid for this field. For example, you may
have entered text in a numeric field or a number that is larger than the
FieldSixe setting."

The date time field is mm/dd/yyyy hhnn. I get the message both when I enter
data including the slashes and space, and when I use an input mask.

Try entering a : between the hours and minutes, it may be objecting to
2005 2005 (at five minutes after eight pm).


John W. Vinson[MVP]
 
L

LAF

Hi Allen and John,

Thanks for the advice. Turns out that if I keep the format, eliminate the
input mask, and manually type the colon between hours and minutes, access
saves the record and eliminates the colon according to format. However, if I
use an input mask with the colon, access gives the error message indicated in
earlier post.

This leads to another question. Is there any input mask that could be used
so that data entry does not require the person to manually put in slashes,
space, and colon?

Thanks,

LAF
 
J

John Vinson

Hi Allen and John,

Thanks for the advice. Turns out that if I keep the format, eliminate the
input mask, and manually type the colon between hours and minutes, access
saves the record and eliminates the colon according to format. However, if I
use an input mask with the colon, access gives the error message indicated in
earlier post.

This leads to another question. Is there any input mask that could be used
so that data entry does not require the person to manually put in slashes,
space, and colon?

Sure:

00/00/0000 00:00

If the user types twelve (valid) digits, Access will put in the
punctuation for them.

John W. Vinson[MVP]
 
L

LAF

Hi John,

I got the same error message when I used your input mask and entered 11 then
25 then 2005 then 12 then 50. Access accepts the same data when I do not use
the input mask and manually enter the slashes, space, and colon.

LAF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top