Input Mask Problem - Date

J

jh

So, I'm creating an input mask for my date field

short date

99-99-9999

works fine and dandy in try it mode, but when I go to add a test record, it
comes back with this message - even though where I type the data it
__-__-____ is there to be filled in.

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 fieldsize setting permits.

WTF.

thanks.
 
K

Ken Snell \(MVP\)

Post the input mask's string from the Input Mask property of the field in
the table.
 
M

missinglinq via AccessMonster.com

A good point to remember when using imput masks is that the user may not
always arrive at the control by tabbing to it from the previous control, but
may click on the control. If a mask is being used and the user doesn't click
to insert the cursor at the very beginning of the text box, he/she may start
to enter data without realizing that they're not at the beginning. When they
leave the control they'll get an error message because the data wasn't
entered as the input mask dictated. They'll then have to go back and re-enter
the info. The way to avoid this is to use something like this:

Private Sub YourControlName_Click()
YourControlName.SelStart = 0
End Sub

Even tabbing to the control can be problematic if in the Options for the db
the default behavior for "entering Filed" is set to anything other than "Go
to start of field." Theanswer to this is:

Private Sub YourControlName_GotFocus()
YourControlName.SelLength = 0
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 

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

Similar Threads


Top