Input mask error message

G

Guest

Using 2003 adp. I have 2 date
fields which are declared "datetime". There is a form with text boxes for
both date fields and each textbox has an input mask of "99/99/00;0;_". When
entering the date in either field, an error message displays stating that the
value entered isn't appropriate for the input mask. This message displays
twice but allows the entry to continue. It appears to be stored OK in the
table. I cannot figure out why this error message is occurring. I have
other datetime fields on other forms with the same input mask and they do not
generate this message.

Any help or advice is appreciated. Thanks.
 
O

OfficeDev18 via AccessMonster.com

Compare the format input mask in the text box (on your form) to the input
mask in your date field (in the table). I suspect they're not identical. I
also suspect you have input masks in both. This is redundant. All you need
input masks in is the table field. The bound text box in the form inherits
the mask from the table, and you should remove the text box's mask and leave
it blank.
 
G

Guest

Thanks for your reply. I had the input mask in the textboxes only. That's
how I had the other datetime fields so I did the same thing here. I took off
the input masks and am now getting an error message that I may be trying to
enter text into a numeric field. So the input masks were not the problem at
all. Now I need to figure out why I getting this new error message.
 
O

OfficeDev18 via AccessMonster.com

Would you mind telling all the properties in one of the text box's property
sheet? I had that problem once and solved it by fixing one of the properties,
but I don't recall which one.
Thanks for your reply. I had the input mask in the textboxes only. That's
how I had the other datetime fields so I did the same thing here. I took off
the input masks and am now getting an error message that I may be trying to
enter text into a numeric field. So the input masks were not the problem at
all. Now I need to figure out why I getting this new error message.
Compare the format input mask in the text box (on your form) to the input
mask in your date field (in the table). I suspect they're not identical. I
[quoted text clipped - 14 lines]
 
G

Guest

Here's some of the properties. Let me know if you need more. Thanks for
your help.

textbox properties:
Name: txtMedCCDateFrom
Control Source: MedCCDateFrom
Format: <blank>
Decimal Places: Auto
Input Mask: <blank>
Default Value: <blank>
(FWIW, this is a subform on a pop-up form)

Table properties:
Data Type: DateTime - Not Null
Format: Short Date
Input Mask: 99/99/00;0;_
Indexed: No
(FWIW, MedCCDateFrom is part of a primary key)

I originally had the input mask on the form only, not the table. I changed
it per your suggestion.







OfficeDev18 via AccessMonster.com said:
Would you mind telling all the properties in one of the text box's property
sheet? I had that problem once and solved it by fixing one of the properties,
but I don't recall which one.
Thanks for your reply. I had the input mask in the textboxes only. That's
how I had the other datetime fields so I did the same thing here. I took off
the input masks and am now getting an error message that I may be trying to
enter text into a numeric field. So the input masks were not the problem at
all. Now I need to figure out why I getting this new error message.
Compare the format input mask in the text box (on your form) to the input
mask in your date field (in the table). I suspect they're not identical. I
[quoted text clipped - 14 lines]
Any help or advice is appreciated. Thanks.
 
O

OfficeDev18 via AccessMonster.com

The Short Date format is not compatible with your input mask. Your input mask
only calls for a two-digit year representation, while the Short Date format
demands four digits. Try one of two things. Either change the format to
<blank> or add two zeroes ("00") to the input mask to make a four-digit year.

HTH
Here's some of the properties. Let me know if you need more. Thanks for
your help.

textbox properties:
Name: txtMedCCDateFrom
Control Source: MedCCDateFrom
Format: <blank>
Decimal Places: Auto
Input Mask: <blank>
Default Value: <blank>
(FWIW, this is a subform on a pop-up form)

Table properties:
Data Type: DateTime - Not Null
Format: Short Date
Input Mask: 99/99/00;0;_
Indexed: No
(FWIW, MedCCDateFrom is part of a primary key)

I originally had the input mask on the form only, not the table. I changed
it per your suggestion.
Would you mind telling all the properties in one of the text box's property
sheet? I had that problem once and solved it by fixing one of the properties,
[quoted text clipped - 11 lines]
 
G

Guest

I had the 4-digit year in the mask originally and still got the error
message. I've had luck with using the 2-digit year in the past so thought it
would work here. Plus the message comes immediately after inputting the
first digit of the month, with or without the mask.

It's almost like there's something wrong with the 'datetime' data type just
for this table. Works fine with other tables. I can't see any differences
between this one and the others.

Thanks for your help.



OfficeDev18 via AccessMonster.com said:
The Short Date format is not compatible with your input mask. Your input mask
only calls for a two-digit year representation, while the Short Date format
demands four digits. Try one of two things. Either change the format to
<blank> or add two zeroes ("00") to the input mask to make a four-digit year.

HTH
Here's some of the properties. Let me know if you need more. Thanks for
your help.

textbox properties:
Name: txtMedCCDateFrom
Control Source: MedCCDateFrom
Format: <blank>
Decimal Places: Auto
Input Mask: <blank>
Default Value: <blank>
(FWIW, this is a subform on a pop-up form)

Table properties:
Data Type: DateTime - Not Null
Format: Short Date
Input Mask: 99/99/00;0;_
Indexed: No
(FWIW, MedCCDateFrom is part of a primary key)

I originally had the input mask on the form only, not the table. I changed
it per your suggestion.
Would you mind telling all the properties in one of the text box's property
sheet? I had that problem once and solved it by fixing one of the properties,
[quoted text clipped - 11 lines]
Any help or advice is appreciated. Thanks.
 

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