Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Phantom adds blank records (VFP3)
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00061098
Message ID:
00061307
Views:
32
>>I have a series of forms based on a class. The init method does some stuff based on form properties set at design time, there is no additional code.
>>
>>My forms are called in a fairly old fashioned way with the following:
>>
>>DO WHILE m.gctask != 'QUIT'
>> &gctask
>>ENDDO
>>
>>m.gctask will be something like "do form property"
>>
>>In most instances this works fine but in one, and I can't see anything different, a record is added to a table. I've debugged the life out of the forms and the record appears to be added after &gctask and before the init code is run. I haven't saved anything in the dataenvironment (haven't quite got to grips with that yet). Nowhere is there an explicit request to add the record. I've even added valid code to a field to generate an error when the record is added but that has provide no clues as to what is adding the record.
>>
>>I am sure my problem is one that more experienced fox programmers will recognise and would really appreciate your help.
>>
>>Thanks - Sarah King
>>propertysoft@xtra.co.nz
>
>Sarah, I had that problem once, and it was linked to an eof() table and a control (I think it was a combo) that needed a value. A new record was added internally to cope with this.
>
>You might try checking the reccount() of the table in question and adding a breakpoint for both eof() and for reccount() = "one more than when I started" (fill in the appropriate number). That was how I found my error.
>
>Sorry I can't be more specific, it was over a year ago....
>
>Barbara

Thanks Barbara, I tried this earlier. I think maybe it was linked to a list box, they are the only things I've worked with and and the problem spontaneously disappeared. I suspect it was VFP was trying to make up for a bug which my "on error" routine didn't catch.

Sarah
Sarah King
pcpropertymanager.com
Previous
Reply
Map
View

Click here to load this message in the networking platform