Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted records problem, Again!
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00049672
Message ID:
00049982
Views:
60
>>>>>I have a form that refuses to not show deleted record! I've tried including SET DELETED ON everywhere but deleted record continues to show for whatever reason. This particular table is for testing only and there is only 1 record in the table and the record IS definitely DELETED (I know because I've deleted it hundred times now) but the form continue to display this record. It's very frustrating. I have many other forms that does not exibit this behavior. Does anyone have any good suggestion why?
>>>>>
>>>>>TIA
>>>>>John
>>>>
>>>>John :
>>>>
>>>>Ensure that you SET DELETED ON in the Init Method of your form. Many environmental settings (including SET DELETED are scoped to the DataEnvironment.
>>>>
>>>>Ed
>>>
>>>Ed,
>>>As I said originally, I did try putting SET DELETED command everywhere, including the Init method of the form but it doesn't work. Actually, I've found out you must put the command in the BeforeOpenTable method of the DE in order for this to work. Thanks anyway.
>>>
>>>John
>>
>>John, if you re-set the record pointer (GO TOP, etc.) after the SET DELETED command it will take effect in the INIT as well.
>>
>>Barbara
>
>Barbara,
>
>Thanks for the hint. However, if I were to use your method, wouldn't I need to reset the rec pointer of all the tables I need to use in the form? If so, wouldn't it require more code in the INIT rather than one line in the BeforeOpenTable of DE?
>
>Just looking for the best (easiest) way to do this.
>
>Thanks
>John.

John, most of the time the need to re-set the record pointer would only apply to a single table - the table that is your main or parent data source. Other tables will be used as Child tables or lookups, and their record pointers will depend on other items, and be set programmatically.

I've never had to set more than one table, and frequently none at all - if, for example, I've passed the form an ID value and gone to that record, then the Deleted status is no longer a problem.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform