PRB: Grid with Focus Ignores Alias of Second Form
Article ID: 181390
Article Last Modified on 5/10/2003
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
This article was previously published under Q181390
SYMPTOMS
When a grid has focus, opening a second form containing bound controls does
not change the active alias to the table used by the controls on the form.
In addition, closing the form with the grid also closes all tables in the
data session, including the table used by the controls on the second form.
RESOLUTION
Here are three resolutions:
- Use a private data session on the second form.
-or-
- Add code to the GotFocus event of the second form to SELECT the
necessary alias. However, this does not prevent all of the tables
closing when you close the form with the grid.
-or-
- Add a command button to the form and add the following code to the Click
event:
DO FORM FORM2
NOTE: Unfortunately, like the preceding option, this does not prevent all
the tables from closing when the form with the grid is closed.
STATUS
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
Additional query words: grid alias
Keywords: kbnofix kbprb KB181390