>This is the code I execute when the update all button is pressed:
>
>SELECT grid
When you select the child table, the relationship to the parent is lost (until you select the parent table again).>GO TOP IN grid
When you GO TOP you're actually going to the first record of the table (in it's current order) regardless of any relationships. Same goes for any of the GO commands>DO WHILE NOT EOF()
> REPLACE noshow WITH "X"
> SKIP 1 IN grid
>ENDDO
With the above in mind, your looping through the entire table here. Eof() is the end of your table.There are several ways to do what your trying to do. Not knowing the specifics, I couldn't recomend a particular solution, but here are some options:
- Add a 'for' clause to your replace all to limit the scope of your records.
- Use a parameterized view instead of the child table directly.
- The 'set key' command will limit the table to only those matching the condition. ie: go top now works as you thought it should. Same goes for most other commands such as scan, replace all, etc.
kenweber
GCom2 Solutions
Microsoft Certified Professional