Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clistobjedit - Deleting records programmatically
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Clistobjedit - Deleting records programmatically
Miscellaneous
Thread ID:
00408580
Message ID:
00408580
Views:
44
Hi,

I have a form that has a clistobjedit in it that is used pretty much to hold detail lines on an invoice.

Whenever I select a "RUSH" check box, a new record is added to represent the RUSH charge for that invoice (i.e. an additional $10 for the order).

It works perfectly when ADDING the rush to the invoice, but if I UNSELECT the Rush checkbox in order to drop the Rush charge I run into problems.

Here's the code I'm using in chkRush.click() (any code irrelevant to the question was ommited):
select v_reqmoney
locate for lower( cdesc) = "rush fee"
if found()
   * rush fee was found, but we're clearing it, 
   * so delete the record

   * First attempt using delete
   * This.Parent.Parent.Page2.cMoneyListObj.CListObj1.delete()

   * Second attempt using cancel
   * ThisForm.Cpageframe1.Page2.cMoneyListObj.CListObj1.cancel()

   * Third attempt relying on the listobj's own delete button
   This.Parent.Parent.Page2.cMoneyListObj.cmdDelete.click()
endif
I seem to have a problem with buffering somewhere because I get a messagebox asking if I'm sure about deleting and THEN I get another messagebox stating that

"Another user changed or deleted the data. Cannot save your changes. Do you want to update your data with the original values? (All your changes will be lost.)"

Users should not see these messageboxes. What would be the right way to do this?

Thanks!

Alex
Low-carb diet not working? Try the Low-food diet instead!
Next
Reply
Map
View

Click here to load this message in the networking platform