Results 1 to 5 of 5

Thread: In Desperate Need of Help!

  1. #1
    Guest

    Question

    I am having some problems with my MDI program. I am not sure how to code my undo menu item. So far I have:

    if typeof activeform = "Transaction" then
    transaction.datprimaryrs.recordset.cancelupdate
    end if

    datprimaryrs is the name of my data control on the transaction form.

    This results in the program opening a new window of the transaction form and correcting the problem. But the problem is now there are two windows instead of one. So I tried

    ActiveForm.datprimaryrs.recordset.cancelupdate

    This doesn't give me any errors, but it doesn't appear to do anything. The undo doesn't work.

    I even tried created a public sub procedure that is on the transaction form to undo the code. But this doesn't work either. Nor does passing the transaction form to that procedure.

    What am I doing wrong?


  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308
    Try this:
    If TypeOf ActiveForm Is YourFormName Then
    YourFormName.datprimaryrs.recordset.cancelupdate
    End If


    YourFormName should be the name of your form from a property window, not it's caption.


  3. #3
    Guest
    Hmmm, transactions is the name of the form. When I type

    transaction.datprimaryrs.recordset.cancelupdate

    it opens a whole new form and then does the changes. So I have two open instead of one. Thanks for the help though...do you have any more suggestions on why it would do that?

  4. #4
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308
    That really works strange. After your last post I've tryed to recreate this and I also got two forms. Than I started again and it shows only one. And I cannot figure out why.

  5. #5
    Guest

    Red face

    Uggh, this is so frustrating. I have been working on this project for about 2 1/2 months and am almost finished and then this!! Can you think of any workarounds? I was assuming since I had the formname.whatever was why it was opening up another window. That is why I am trying to get the ActiveForm to work. But it doesn't do anything at all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width