main logo
Subject: OK2move = .F. due to child
Author: Mike Devlin
Posted: 2000/11/16 10:52:52
 
View Entire Thread
New Search


Hello again,
I am back after a few days of rebuilding our file server which crashed.
I have started this new thread, since I now have found the problem, which is deserving of a new thread. The problem I was having was in the Next() method, when used in a parent-child bizobj form. Everytime I would open the form, and requery to populate the controls, all would happen according to plan. I would click my next button (using Thisform.next() ) and the first pass would be fine. The controls would show the fields of the second record of the parent, and the grid would display the child records associated with the second record (which were none in this case). And this is where the problem lies. On the second pass, the debugger shows the current alias() as being the child view, which is at recno() 1 since it is empty, which also means that eof() returns .T. So, when the next routine runs ok2move(), it returns .F. since it thinks that it is at the eof, and will not move the pointer. And as long as the child view has no records, the ok2move returns .F. That is why first, previous and last work just fine, except that last will also not work if there are no records in the child view.

My question is how do I get the alias() to be the parent view instead of the child view?
I use alias(), since that is the expression I am using in the debugger to keep track of the view being affected. I had to use alias(1) and recno(alias(1)) to see the parent view.
Devman
mdevlin at ajdebruin .DOT com

 
©2000 Mike Devlin
<-- Prior Message New Search Next Message -->