I've run into a weird problem I can't seem to figure out. I have a table that is opened in dataenvironment of the form with an initial index tag. When I try to insert new records with "INSERT INTO...", it gives me an "Index tag not found!" error. I'm looping through a temporary cursor on the form and adding records from this cursor. My code looks something like this:
SELECT invt
SET ORDER TO TAG "refno" &&my table's primary key tag which I'm changing from another tag
SELECT cNStyle && cursor
SCAN
IF EMPTY(cNStyle.refno)
*-- THIS IS WHERE ERROR MESSAGE APPEARS!!!
INSERT INTO invt (field1,etc...) VALUES (cNStyle.field1, etc...)
ELSE
SELECT invt
IF SEEK(cNStyle.refno)
REPLACE field1 WITH cNStyle.field1
....
ENDIF
SELECT cNStyle
ENDSCAN
Any suggestions?
TIA, John
It's "my" world. You're just living in it.