FIX: Error 3315 or 3426 When Updating a Bound DBCombo Box (189678)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q189678 SYMPTOMS
When the ListField property is not set on a bound DBCombo box, one of the
following errors can occur when you try to Update the Recordset.
Runtime error '3426':
This action was cancelled by an associated object.
Run-time error '3315':
Field 'Tablename.Field' can't be zero-length string.
CAUSE
The new value is not being saved to the BoundText property of the DBCombo
box. If you check the BoundText property (e.g. Msgbox DBCombo1.BoundText),
it will be blank.
RESOLUTION
If you set the ListField property, the BoundText property will retain the
data.
The RowSource property in the On Line Help states the following:
"To fill the list in a DBCombo or DBList control, you must specify a
Data control in the RowSource property at design time using the
Properties window.
To complete the connection with a field in the Recordset object managed
by the Data control, you must also provide the name of a Field object
in the ListField property."
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in Visual Basic 6.0.
REFERENCES
For additional information, please see the following article in the
Microsoft Knowledge Base:
186682
: BUG: DBCombo BoundText Incorrect When Setting Text Property
Modification Type: | Major | Last Reviewed: | 10/30/2003 |
---|
Keywords: | kbbug kbfix KB189678 |
---|
|