Opening form unexpectedly closes other form

Jul 23, 2015
Reaction score
Hi all,

I have been struggling to solve an issue with a database in which when a data type is used, a form must be loaded to have its RecordSource property updated. To do this, the form is opened as hidden, property updated and saved and closed. This is done with the following code.

DoCmd.OpenForm "FD3_stats", acHidden
Forms.FD3_stats.RecordSource = FD3_table
DoCmd.Close acForm, "FD3_stats", acSaveYes

As this code is executed, a further 3 forms are open in the GUI. When the FD3_stats form opens, one of the other 3 forms moves to the back of the stack of forms and another of the three closes. I would like to stop both of these associated actions from occuring.

Although the code is in fact very large, I have used the debug mode to find that as soon as the line "DoCmd.OpenForm "FD3_stats", acHidden" is run, the closing and moving to background of the other two forms occurs.

As far as I can tell, the FD3_stats form has no event procedure associated with it. It launches no process of its own and is simply a form for displaying some text. I cannot determine why opening this form carries out any effect on the other forms. Can anyone suggest a possible cause?



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question