Why can't I opening the same form twice at the same time?

Claudiusjerry

New member
Local time
Today, 10:42
Joined
Jul 15, 2024
Messages
23
IS the action of opening a continuous form in access twice in one device Is restricted by the version or hardware or location or connection of the computer?

I tested by opening the same continuous form in access (same file name)at the same time in one device, both of them works fine, the data I input in 1 form will be updated to the another form after system refresh, but my co-worker did the same thing, which is in another country, using window 10 (I do not know if it is related or not), and then the system shuts down automatically, it doesn't allows my co-worker to open it twice. Why does this happens?

Also, while I open the same form at the same time in two separated devices, data will not be synchronized, is there a way to allow all the same form at different devices automatically update with the newest data if only modified in 1 device? Is it possible for a continuous form to synchronize data after refresh in separated devices?
 
then the system shuts down automatically, it doesn't allows my co-worker to open it twice. Why does this happens?
I think, this must be caused by either a corruption issue in the database file. Try /decompile and Compact&Repair to fix this.
If the problem happens only on a specific computer, check the Access installation there and up-/downgrade to the same version as on your computer.

Also, while I open the same form at the same time in two separated devices, data will not be synchronized, is there a way to allow all the same form at different devices automatically update with the newest data if only modified in 1 device? Is it possible for a continuous form to synchronize data after refresh in separated devices?
There is no built-in "automatic" synchronization. You must use Form.Requery to fetch the data changes that were made on other devices.
 
Are you aware of the front end back end arrangement which is recommended if you have a database accessed by multiple users?

The backend is a single Microsoft Access database which houses the tables.

The front end is a Microsoft Access database that is linked to the back end database tables.

You create multiple copies of this front end database and give each user THEIR OWN COPY...

You MUST NOT ALLOW the users to share the same copy of the MS Access database this is a shure fired way of creating problems!
 
Last edited:
IS the action of opening a continuous form in access twice in one device Is restricted by the version or hardware or location or connection of the computer?

You can open multiple instances of a form.

Garry Robinson did a smart Access newsletter on it a few years back. Smart Access is now defunct but I do believe there is a website where you can find most of the articles.
 
A form is just an instance of a class. The normal way of opening with Docmd.openForm always refers to the same instance. To create a second instance you just need to set a variable of an Access form to with a create statement or a declaration of Set Form = New formname.
 
is there a way to allow all the same form at different devices automatically update with the newest data if only modified in 1 device? Is it possible for a continuous form to synchronize data after refresh in separated devices?

As noted, there is the style of the front-end/back-end (FE/BE) database, achieved through the Database Tools tab option to split the database. IF you then have a single BE that shares all the tables, each user can have a FE linked to the single BE. BUT there is one remaining consideration. In the File >> Options path there are some settings you can alter that related to behavior of databases. One of them is the "automatic refresh" option that you would use to tell each FE to automatically refresh from the BE every 30 seconds (or some other number). So if you have multiple users with each having the individual FE file, you can get pretty good synchronization and refreshing. It is not advised to set this number lower than every 30 seconds because it starts to bog down system responsiveness.
 
In the File >> Options path there are some settings you can alter that related to behavior of databases. One of them is the "automatic refresh"
I didn't know about that one!!
 
For a non-default instance to stay open, it can also just set a reference to itself, like....
Code:
Private me_ As Form

Private Sub Form_Load()
    Set me_ = Me
    Me.Visible = True
    Me.Caption = "Non-default instance"
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set me_ = Nothing
End Sub
Then in the immediate pane do...
Code:
? Form_Form3.Caption
Non-default instance
... and the form stays open. This way you don't have to add a reference to a persistent collection, you persist it in itself.
 

Users who are viewing this thread

Back
Top Bottom