>I am attempting to run the following code when a button of a form is clicked:
USE dig-shrtv2!dsjn
IF ((recsize()>0) AND (seek(gnactivejobnumber)))
DO FORM AddOrUpdate.scx
ELSE DO FORM originate.scx
Endif
thisform.Release()
>When execution gets to the IF/AND line, the code errors out with:
>
> Error loading file - record number 9. APSPOR
> members>. Loading form or the data environment: Cyclic Relation
>
>I assume this error occurs because SEEK() can only be run on primary indexed
>tables ( which dsjn IS !! ) and that something is awry with the
>relationships between dsjn and pnt_det or progress ( the other two tables).
>dsjn has a primary index on a field 'job_num'. This is related to a 'regular'
>index in both of the other tables. The indexed fields in all three tables
>have the same name. Only the index in dsjn is PRIMARY! The other two are
>REGULAR. All are indexed 'descending'. What is cyclic about this
>relationship?
>
>BTW...The 'Data Environment' window shows a line connecting the indexes
>in 'pnt_det' and 'progress' with the job_num FIELD ( not the index!! )in the
>dsjn table. Hmmmmmm.. Shouldn't those lines show a connection to the 'index'
>in dsjn..not the field itself??
>
>Clear as mud to me ;-) ...Can anyone educate my ignorance?
This message isn't related to SEEK: it's related to one of the following DO FORM commands. My guess is that one of those forms has a relation set in the reverse direction to the relation in your current table.