Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5.0 - Record Pointer Moves when another form calledH
Message
From
18/08/1997 15:29:43
 
 
To
18/08/1997 15:22:02
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00045357
Message ID:
00045365
Views:
48
>>>I hope someone can help me.
>>>
>>>Form A
>>>- private data session
>>>- table 1 with buffer mode 5
>>>- table 2 with buffer mode 5
>>>- a one to many relation set in a grid object on Form A relates Table 1 to Table 2.
>>>- a command button that adds a record to Table 1 then to Table 2 and calls Form B.
>>>
>>>Form B
>>>- default data session
>>>
>>>
>>>Problem: When I add a record to Table 1 then to Table 2(parent child records) and then call Form B to fill in information in Table 2 record VFP moves the record pointer in Table 2 during the call of Form B. I have tried everything I can think of to fix problem. If I turn off the relation in the grid object and then run it works fine but I need to have in enabled to display records properly. If someone else has had this problem please reply.
>>>
>>>Mike Laubach
>>>mlaubach@mt-solutions.com
>>
>>Did you try this construction just to make sure that situation is clear?
>>
>>Select Table2
>>nRecno=recno()
>>do form B && I guess it's modal form
>>Select Table2
>>go nRecno
>>
>>The second thought: if you somehow move pointer in table A (during the call), pointer B will shift automatically, because of temp repationship.
>
>No the pointer is not being move by me anywhere. Basically the code looks like this:
>
>commandbutton.click
>-------------------
>insert into table1 .....
>insert into table2 .....
>
>do form formb
>
>
>By the time execution reaches the init event in formb the record pointer in table2 has moved. I have even have gone so far as to send the record pointer table2 should be at to formb and set it in the init but still did not work. As soon as the init code finished executing it would move the pointer again. Anymore help would be greatly appreciated.
>
>Mike Laubach
>mlaubach@mt-solutions.com

I understand that moving a pointer by unknown reason is unpleasant to see, but you could restore pointer when Form A will reacquire focus, and nobody will care about behind-the-scene manipulations. If Form B is modal just Go nRecno after Do Form... If it's modeless, restore pointer in FormA.Activate Event.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform