Open New Form from Form

OCC_SF_Access

New member
Local time
Today, 14:36
Joined
Sep 17, 2008
Messages
7
Hello,

I have a simple question. How can I open a new form (called Incentive Type 1) based on a value being input within a subform without the OpenForm command running continuously? Below is the code that I have for AfterUpdate() for a Control called Incentive Scenario Type:

Sub Private Incentive_Scenario_Type_AfterUpdate()
DoCmd.OpenForm "Incentive Type 1"
End Sub

Any help is miuch appreciated!
 
After I've entered in a value, the new form is opened, but it is then continuously opened again and again. As a result, when data is entered into the first field of the opened form, it disappears immediately and a new blank form is shown.

Also, the mouse cursor seems to blink incessantly from 'busy' to 'pointer'.
 
There's nothing in this code that would cause this. What code do you have in the Form_Open, Form_Load, and Form_Current of the form that is being opened?
 
There is nothing in any of those fields that you mentioned. I can't really understand what other possibilities could be causing this. Again, once I've input data into a subform on the main form, an AfterUpdate() event for the updated field in the subform has the code that I've included above. This results in an opening of the intended form, but a continuous opening of this form again and again. In the bottom left of the screen, "Calculating..." flashes incessantly.

Guess it's just a big mystery!
 
Hi,

Do you have an OnTimer event set on any of your open forms? That would give you the 'Busy' to 'Pointer' activity you mentioned and may be firing the AfterUpdate event.

Tlender
 
Does anything odd happen if you open the troubled form independently, by simply clicking on its name in the objects dialog box?
 
Thanks for the responses everyone. Actually, oddly enough, today when I went back to working on the form it did not produce the error that I had been experiencing. I did not change any of the code, and I can't figure out what happened that could have eliminated the problem.

All's well that ends well!
 

Users who are viewing this thread

Back
Top Bottom