0
votes

this may seem like an odd question, but I am wanting to requery a form that is opened by another user. Basically I have two different main menus, that pertain to the role of the employee. On these main forms I display a menu with the counts of clients in each status. I then have a main form that holds the clients data. After I update the status field I am requery both forms. Now this requerys the menu that is open on the current user that changed the status, but it doesn't requery the other menu that is opened by the other user unless they close the menu and reopen. Is this possible to requery another subform of another user's form.

Here is my code below:

Private Sub status_ID_AfterUpdate()
On Error GoTo Problems


DoCmd.RunCommand acCmdSaveRecord

Forms!frmNursesMenu!frmStatusCount_Nurses.Form.Requery
Forms!frmNursesMenu!frmStatusCount_Nurses.Form.Repaint

Forms!frmNursesMenu.Requery
Forms!frmNursesMenu.Repaint

Forms!frmAdminMenu!frmStatusCount.Form.Requery
Forms!frmAdminMenu!frmStatusCount.Form.Repaint

Forms!frmAdminMenu.Requery
Forms!frmAdminMenu.Repaint


Exit Sub

Problems:
Err.Clear


Resume Next
End Sub
1
"a form that is opened by another user" - you mean on a different computer in a different instance of MS-Access? No, you can't requery that. - Andre
Yes it would be on a different computer, but on the same network drive, same server and same database, but different instances. So how would I be able to update the status for all employees to see real time on their menus. Is there a way to open the browser maybe and update there - SikRikDaRula

1 Answers

0
votes

You will need to use the form's timer event to requery the form every so often or look to see if the form needs a requery.

If your tables include a column with the time of the last edit then you could use that to see if the form needs a requery.