Search code examples
ms-accessvbams-access-2010multiple-users

MS Access not working for multi user


I have a DB I created as a sort of real time virtual client check in log. It would be stored on an intranet network drive. In theory, a greeter can send client information back to be picked up by another worker. This is done through a series of forms, tables, and queries. When I test it myself on my own machine, opening both the greeter and reception forms I can enter information on the greeter, click the action button to send it to the table, where a timered query(held in a hidden form opened with an AutoExec macro) picks up the current record, and then displays it on the reception form. Everything works perfectly. The only problem is, when I try to test it on multiple computers, the greeter can send info back, it appears on the table, but the reception form never populates. Any ideas where the disconnect might be?

edit I have decided I want to do away with the hidden initialize form, so I've re-organized the code as follows. It still works when I do it myself on one computer, but opening the reception form on another computer it still fails to populate.

Reception 1

Private Sub Form_Timer()

If gClientID > gNextClientID Then
gblnRNC = True
Else: gblnRNC = False
End If

If gblnRNC = True And gblnRec1Free = True Then
gRec1CL = gNextClientID
MsgBox "There is a new client to be seen.", vbSystemModal, "New Client  Warning"
Me.RecordSource = "RecClientIDNum"
End If   
End Sub

Solution

  • So forgive my noob question, I sorta jumped into programming procedures without fully understanding how Access works. I declared global variables but didn't realize they were only global within the scope of the local session running on a particular machine.

    Moved the variables that establish the interactions between the various forms to a table and everything works perfectly.