I have this code in an OnSaveRecord event. I have a set, 1 to many. The header is for name, date, id number. I'm using this code to number the records in the embedded browse 1 thru 200.
After entering about 150 records or so, and then create a new record at the parent level, the browse starts flashing and then A5 is locked up and I have to use Task Manager to shut A5 down.
When I go to field rules to Events tab, the code changes from Qty->Line_no field to Qty->Id field. There are no field rules for Qty->Id field. But I will delete out of the events tab of the Qty->Id field and put it back in Qty->Line_no field, but didn't stay.
Now since I have been working on this, when I try to enter data in the browse I get a error message "extra charactors at end of expression" The attached db was not getting this message when I attached it. I have encountered this problem since, while trying to fix.
It seemed to be working fine until I changed the code, where 3 is now, it had 2 originaly. My numbers would go to 99 only. I changed that thinking it would use 3 digits instead of 2. And it did.
Thanks for your help.
After entering about 150 records or so, and then create a new record at the parent level, the browse starts flashing and then A5 is locked up and I have to use Task Manager to shut A5 down.
Code:
Date Created: 18-Oct-2005 01:05:31 PM 'Last Updated: 18-Oct-2005 01:05:31 PM 'Created By : David 'Updated By : David ''XBasic dim head as p dim items as p dim line_no as n line_no=0 on error goto not_in_set head=table.get("header") on error goto 0 items=table.get("qty") items.fetch_first() while .not. items.fetch_eof() line_no=line_no+1 items.change_begin() items.line_no=padl(ltrim(str(line_no,3,0)),3,"0") items.change_end(.t.) items.fetch_next() end while parentform.resynch() end not_in_set: on error goto 0 end
Now since I have been working on this, when I try to enter data in the browse I get a error message "extra charactors at end of expression" The attached db was not getting this message when I attached it. I have encountered this problem since, while trying to fix.
It seemed to be working fine until I changed the code, where 3 is now, it had 2 originaly. My numbers would go to 99 only. I changed that thinking it would use 3 digits instead of 2. And it did.
Code:
items.line_no=padl(ltrim(str(line_no,3,0)),3,"0")
Comment