PRB: APPEND BLANK on a Child Grid Does Not Display New Record (141740)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q141740 SYMPTOMS
In a one-to-many form, when you want your form to have the ability to add
child records into the grid, you find that clicking the grid does not allow
you to scroll beyond the last record. Adding a button that uses APPEND
BLANK to add a new child record won't add a record to the grid.
CAUSE
In a one-to-many form the grid only displays related records -- records
that have a key identical to the key of the parent. When you issue an
APPEND BLANK command, the key field in the new record is blank and is
therefore not displayed in the grid.
RESOLUTION
After issuing an APPEND BLANK command, use REPLACE to write a value to the
key field. You can also use the INSERT command with the VALUES clause
instead of APPEND BLANK. For example, remove the asterisk from the code in
step 4 below, or use the command button in Step 5 to resolve the problem.
STATUS
This behavior is by design.
REFERENCES
For more information, please see the following article in the Microsoft
Knowledge Base:
138559 How to Append Records to a Grid
Modification Type: | Major | Last Reviewed: | 11/17/2003 |
---|
Keywords: | KB141740 |
---|
|