If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Can VBA open a form in an already open database?
I am able to use the OpenCurrentDatabse method to open a new instance
of an existing database and then open a form within that database. However, if the database I am interested in is already open, is there a way to open a form in the existing instance of that (already open) database? Thanks. NB. The VBA code being executed exists in one database, and the form in a different database. |
#2
|
|||
|
|||
Can VBA open a form in an already open database?
If the database you are opening is not opened in exclusive mode, you should
be able to open it. Are you having problems with it? -- Dave Hargis, Microsoft Access MVP "billelev" wrote: I am able to use the OpenCurrentDatabse method to open a new instance of an existing database and then open a form within that database. However, if the database I am interested in is already open, is there a way to open a form in the existing instance of that (already open) database? Thanks. NB. The VBA code being executed exists in one database, and the form in a different database. |
#3
|
|||
|
|||
Can VBA open a form in an already open database?
On Oct 25, 5:35 pm, Klatuu wrote:
If the database you are opening is not opened in exclusive mode, you should be able to open it. Are you having problems with it? -- Dave Hargis, Microsoft Access MVP "billelev" wrote: I am able to use the OpenCurrentDatabse method to open a new instance of an existing database and then open a form within that database. However, if the database I am interested in is already open, is there a way to open a form in the existing instance of that (already open) database? Thanks. NB. The VBA code being executed exists in one database, and the form in a different database. It's not that I can't open it, but rather that it is already open. This is what I want to do: 1. database1 - start database2 and open form1 (from vba in database1) 2. database1 - close all forms, but keep database1 open 3. database2 - after required actions, open database1 form1 4. database2 - close I can perform steps 1,2 and 4 but I do not know how to open a form in database1 (when the database is already open) from vba in database2. |
#4
|
|||
|
|||
Can VBA open a form in an already open database?
I have never done anything quite like that, so I am not sure how it would be
done. -- Dave Hargis, Microsoft Access MVP "billelev" wrote: On Oct 25, 5:35 pm, Klatuu wrote: If the database you are opening is not opened in exclusive mode, you should be able to open it. Are you having problems with it? -- Dave Hargis, Microsoft Access MVP "billelev" wrote: I am able to use the OpenCurrentDatabse method to open a new instance of an existing database and then open a form within that database. However, if the database I am interested in is already open, is there a way to open a form in the existing instance of that (already open) database? Thanks. NB. The VBA code being executed exists in one database, and the form in a different database. It's not that I can't open it, but rather that it is already open. This is what I want to do: 1. database1 - start database2 and open form1 (from vba in database1) 2. database1 - close all forms, but keep database1 open 3. database2 - after required actions, open database1 form1 4. database2 - close I can perform steps 1,2 and 4 but I do not know how to open a form in database1 (when the database is already open) from vba in database2. |
#5
|
|||
|
|||
Can VBA open a form in an already open database?
It seems that the GetObject() function should allow you to reference
an existing instance of a database. However, when I have tried it it opens a new instance or generates an error. It should be possible once I figure out how to use GetObject(). |
Thread Tools | |
Display Modes | |
|
|