I have an Access 2007 form (Form A) with a button that executes a macro that opens another form (Form B). In the OnActivate property of Form B, I have an event procedure that executes a function I created in a new object module. The function includes code that sets the active form's recordset type to snapshot (Screen.ActiveForm.RecordsetType = conSnapshot). The problem is that this OnActivate event procedure code gets executed twice. I have displayed the name of the active form in the function and the first time it executes it displays Form A. The second time it executes it displays Form B. According to Microsoft, the OnActivate event is not supposed to fire until Form B has become the active form. So, 1) why does the function execute twice and 2) why doesn't the active form become Form B until the second time? Even if changing the recordset type triggers the re-activation of the form, still the first time it executes it seems to me the active form should be Form B, not Form A. Hope this is all clear. This matter has me nonplussed. Any help will be much appreciated!
PS: I know there is another old thread with essentially the same question, but there was no real answer.
PS: I know there is another old thread with essentially the same question, but there was no real answer.