FIX: Blank Child Record Added in One-to-Many Wizard Form (149456)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
This article was previously published under Q149456 SYMPTOMS
If you create a form using the One-to-Many Form Wizard, or the TXTBTNS
class in a form with a child grid, a blank record is added to the grid when
the child key field name is different from the parent key field name.
CAUSE
The code in the TXTBTNS class of Wizstyle.vcx that adds the child record
incorrectly adds a blank record.
WORKAROUND
Rename the key field in the child table to give it the same field name as
the key field in the parent table. Recreate the form with the One-to-Many
Form Wizard.
-or-
Change a line in the procedure code associated with the cmdAdd.click event
in the Txtbtns class of Wizstyle.vcx.
The following line:
IF EMPTY(m.cChildKey) OR TYPE(m.cChildKey)#TYPE('oAddRec.KeyValue')
should be modified to read:
IF EMPTY(m.cChildKey) OR TYPE('m.cChildKey')#TYPE('oAddRec.KeyValue')
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem has been fixed in
Visual FoxPro 5.0 for Windows.
Modification Type: | Major | Last Reviewed: | 9/30/2003 |
---|
Keywords: | kbBug kbfix kbvfp500fix KB149456 |
---|
|