Error 2115 BeforeUpdate or ValidationRule Error (DB example attached)

cford31

New member
Local time
Today, 02:55
Joined
Jan 1, 2007
Messages
6
I've attached a db (2000 version) of this problem.

The ParseTime function allows the user to enter 115 instead of 1:15 pm.

The ParseTime function is called if one of the following errors occur.
- Error 2279 is caused when the text entered does not match the input mask
- Error 2113 is caused when the value entered does not match the Data Type of the field.

When the input mask is used it works. When I take away the input mask it still runs the ParseTime code (b/c Error 2113 is tripped), but it gives the following error message:

Code:
Run Time error '2115':

The macro or function set to the BeforeUpdate or ValidationRule
property for this field is preventing CID from saving the data in the field."
 

Attachments

The problem is that it is bound to a field which is Medium Time. This means that anything that doesn't match
1:15 AM
or 1:15 PM typed like that will not work. To do your parsing, set the text box as an unbound text box and do your parsing in the afterupdate event of the text box and set the value to a hidden, bound textbox.
 
Would it work if I changed the bound field to no format?
 
I think you'll still have the problem as long as you have the datatype set as Medium Time because typing in 115 doesn't follow what it is expecting.
 

Users who are viewing this thread

Back
Top Bottom