Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When does child grid obey relational expr. in one/many form
Message
From
26/02/2001 23:36:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
When does child grid obey relational expr. in one/many form
Miscellaneous
Thread ID:
00479897
Message ID:
00479897
Views:
64
Please bear with my ignorance on this, I am more accustomed to using views, or sql server data. Anyway I have a one to many form, with the relational properties set properly

surques is my parent, surans is the child table. I have add edit delete buttons
under my grid. For each row in surques there may be many rows in surans.
each row in surans has a column cansid, numbered sequentially, basically a line number.
if i have 4 rows in surans :
cansid
0001 a
0002 b
0003 c
0004 d

if i delete 003 i want the rows to be automatically renumbered.

so in my click method of my button i say

go top in surans
do while not eof('surans')
**code to renumber line here

skip in surans
enddo

My question is: when will / will not the conditions for including a row in the child grid be 'obeyed'. does 'go top' apply to the rows that show in the grid that meet the relational expression condition, or does it apply to the whole table. In one case, it worked only on the rows applying to the key value, in another it renumbered all lines in table??? I have the same question for
eof() bof() goto, etc.

if the relation set in the de doesn't apply here, then how can i 'go top' for
the current key

should my while loop cond. include something like
lcsurqno=surques.csurqno
do while not eof()and surans.csurqno=lcsurqno
Reply
Map
View

Click here to load this message in the networking platform