|
-
Apr 28th, 2000, 08:53 AM
#1
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?
-
Apr 28th, 2000, 09:50 AM
#2
Hyperactive Member
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.
-
Apr 28th, 2000, 10:06 AM
#3
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?
-
Apr 28th, 2000, 11:32 AM
#4
Hyperactive Member
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.
-
Apr 29th, 2000, 12:36 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|