General information
Category:
Coding, syntax & commands
>>>>>By the way, thanks. Exactly what you said, the child table pointer was reset because my navigation class selects my master table on refresh. I will try to see how I can solve the problem.
>>>>>
>>>>>Just a sidetrack, when I have parent-child-grandchild form with the child and grandchild in grid, the grandchild is not set to table-buffering automatically by VFP. Is this by design? My form is set to optimistic.
>>>
>>>Yes, this is by design. Just re-set the grandchild's buffering in the data environment.
>>>
>>>>
>>>>I have a part of the coding as follow:
>>>>
>>>> APPEND BLANK
>>>> REPLACE pagr_key WITH pa_grade.pagr_key, roll_no WITH cRoll_no
>>>> nWorkarea=select()
>>>> nrecno = recno()
>>>> THISGRID.REFRESH()
>>>> select (nWorkarea)
>>>> go (nrecno)
>>>>
>>>>I got the error 'record is out of range'. I have checked that the table before append and after refresh is the same (by using messagebox) and that the appended rec no is -ve. What can go wrong?
>>>>
>>>>This is bad... I hope you can give me some clues.
>>>>
>>>>Thanks.
>>>
>>>Tai, try it without the () on the GO (nRecno) line.
>>>
>>>Also, is there a tableupdate in your Refresh code? That would change the negative recno to a positive one. Check the actual recno() with your message boxes or with debug.
>>>
>>>Barbara
>>
>>Gives me same error without the (). When I suspend, the rec number is -1 which is the rec number for the newly appended record. However, the current alias() is the grandparent's alias. The workarea is the grandchild's workarea. The SELECT (nWorkarea) not working? Very strange. Really hard to debug with this kind of result.
>>
>>What on earth is going on?
>
>Maybe while I suspended, the form lostfocus and executed some codes? Anyway, while I was suspended, I issue 'SELECT 1' and 'SELECT (-1)' at command line and it is working. But if I issue 'SELECT -1', it gives me the same error. Can this be related to the problem? If it is, any way I can overcome it.
Sorry 'SELECT 1' and 'GO -1' vs 'SELECT 1' and 'GO (-1)'
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only