Hello,
I'm sharing a ms access project over network with multiple users.
I want to know which form is already opened by the other users in their computer.
for that, i have a form called "dashboard" containing two buttons , each button open a different form (docmd ...) the first button open the form "Form1", the second button open the form "Form2".
The idea is that buttons in "Dashboard" changes their colors (caption.forecolor) when they opened by a user.
I used the code :
Code:
Private Sub FormsCtl()
If CurrentProject.AllForms("Form1").IsLoaded = True Then
Me.Commande0.ForeColor = RGB(255, 0, 0)
Else:
Me.Commande0.ForeColor = RGB(51, 204, 51)
End If
If CurrentProject.AllForms("Form2").IsLoaded = True Then
Me.Commande1.ForeColor = RGB(255, 0, 0)
Else:
Me.Commande1.ForeColor = RGB(51, 204, 51)
End If
End Sub
Code:
Private Sub Form_Open(Cancel As Integer)
FormsCtl
End Sub
Private Sub Form_Timer()
FormsCtl
End Sub
When I open a form (Form1 or Form2) in my computer , I get the code working perfectly (Buttons colors changed) .
But when an other user open the same forms in his own computer, Colors of buttons don't change in my computer.