deleting from a lookup form?!

deepbluedeepblue Member Posts: 152

I have a form in which i'm using a lookup form(F5). In that lookup form, i added a button that delete the selected records.
The problem is the following: When i delete the record that was dispalyed in the first form and i close the lookup form the record that was deleted still displayed and that's not what i want. It have to be deleted and the user can't see it again.

Thank you.


  • BalelloBalello Member Posts: 61
    You need to write CurrForm.udate(false) in the calling form. But Where? Two solutions:
    1) You don't use properties to call the lookup and write code in the OnPush trigger and run the form using runmodal. When closing the lookup form you call the function I said. So you write the CurrForm.update(false) at the end of OnPush.
    2) You write code on Ontimer that check if the record exists and if not it call currform.update(false) (I don't like this one.... but it's possible I think)
    I don't envy anybody who caught up his aim. I travel gladly.
  • deepbluedeepblue Member Posts: 152
    I don't like the second solution too. And the first one is not suitable for me
    because my calling form is already opened and running when I close the lookup form...

    Anyone has other solutions please?
  • BalelloBalello Member Posts: 61
    What I intended was to write something lije this code on calling form:


    currRecord := rec;
    if form.runmodal(lookupformID,currRecord) = action::lookupok then
    rec := currRecord;

    Surely, the calling form is alive. It updates when closing the lookupform, however, but this make sense.... or not?

    I don't envy anybody who caught up his aim. I travel gladly.
Sign In or Register to comment.