I have 2 non-modal forms open, Form1 and Form2. They are overlapping but not completely. When Form2 is the active form, some of Form1 is visible on the left and when Form1 is active some of Form2 is visible on the right. So if Form2 is active and I want to switch to Form1 I just move the cursor over to the area of the screen where Form1 is showing and click. Similarly for activating Form2 when Form1 is active.
Eventually I want to have both forms occupy the entire screen and have buttons on each allowing the other to be activated. On Form2 I have a button, Command4, which has the following click code
Private Sub Command4_Click()
Forms!Form1.Activate
End Sub
When both forms are open I activate Form2 and I click Command4 I get the following error message
Runtime error 2465
Application defined or object defined error
Any suggestions as to what the correct code might be?
Thanks in advance