Article ID: 172101 - Last Review: June 28, 2004 - Revision: 2.0 PRB: "Data Type Conversion Error" When Using a Data ControlThis article was previously published under Q172101 On This PageSYMPTOMS
Deleting the data from a text box bound to certain data types, such as an
integer or date, causes Error 3421:
"Data Type Conversion Error."
NOTE: If you are using a dbGrid, it's Error Method will produce Error 16389. CAUSE
This is designed behavior of DAO. The data control is sending a NULL string
to DAO and DAO attempts to coerce it to a number and fails. This is not a
problem with the Data Control: The same behavior can be observed without
the use of a Data Control, using only code. For example:
RESOLUTION
Use the following code in the Data Controls Validate method to allow the
edit to occur as expected by user:
STATUS
This behavior is by design.
MORE INFORMATIONSteps to Reproduce Behavior
APPLIES TO
| Article Translations
|
Back to the top
