OpenDatabase vs OpenFile

This may be coincidental to B26, but we discovered our code contained an OpenDatabase statement followed by and OpenForm statement that did not work. The form called did not open and display on top. Once the file was open, however, the combo OpenDatabase followed by OpenForm worked as expected. We replaced the OpenDatabase statement with OpenFile to avoid the problem.

OK, after writing the my post, I think I finally understand the difference between OpenFile and OpenDatabase, and there is no issue here. OpenDatabase does not make the opened database the active database unless the database is already in open and in memory.

I think your statement is backwards.

If the specified database is not already open, OpenFile and OpenDatabase are identical.

If the specified database is already open with one or more visible windows, OpenFile and OpenDatabase are identical.

If the specified database is already open but there are no visible windows, the OpenFile statement will open the default windows for the database, but the OpenDatabase statement won’t due anything. There is a long standing open bug report about this.