Hi Kay
>I have two grids on a form. One grid (GRID1) shows all family in a household and the other grid (GRID2) shows a listing of phone numbers for a family member selected in GRID1.
>
>Each time, a different family member is selected from GRID1, I need to update GRID2 with an index file with filtering on family increment to display a proper phone listing.
>
>Ex> INDEX ON STR(tiMTPmbrno)+STR(ttMTPnincr)+STR(ttMTPtincr) TAG idx_MTP OF cdxPhonebook FOR tiMTPmbrno>0 AND ttMTPnincr=gttMNMnincr UNIQUE
>
Building an index to filter is the wrong way to go. Create the index
INDEX ON STR(tiMTPmbrno)+STR(ttMTPnincr)+STR(ttMTPtincr) TAG idx_MTP OF cdxPhonebook
without the FOR condition and leave it on the table. Don't add the UNIQUE. If there are multiple phone records you should show them so they can be fixed.
>For that, each time I select a different family member in GRID1, I am executing TABLEUPDATE to update modified phone record. Otherwise, I was getting an error message “Table buffer for alias ‘curPhonebook’ contains uncommitted changes”.
>
>I really like to find a way to save the modified phone information when I am finish working with that particular family and move on the next set of family. If any one has any recommendation on how I can address this situation, I will be very grateful.
Then as the user moves from person to person, use SET FILTER or SET KEY on the phone table. This will allow you to delay the save until the user is finished with the form.