allochthonous
Technical User
Is there any way that I prevent more than one user of a FE/BE database accessing the same table at the same time?
I tried using
If SysCmd(acSysCmdGetObjectState, acTable, "tblBrandsEditTEMP") <> 0 Then
MsgBox "To maintain data integrity, only one user may edit the Brands table at a time. Please try again."
Else
DoCmd.OpenForm "frmEditBrands", acNormal
DoCmd.Close acForm, "frmMaintMainMenu"
End If
But this only appears to work within the same database instance. If I attempt to open a form that accesses this table in another copy of the FE, it opens as normal.
I need a way to check to see if anyone else is accessing the table, and if so, prevent it. I create the table when the form is opened, and clear it when the form is closed, so worst case, i could check for contents in the table, but this seems sloppy.
Thanks
Paul
I tried using
If SysCmd(acSysCmdGetObjectState, acTable, "tblBrandsEditTEMP") <> 0 Then
MsgBox "To maintain data integrity, only one user may edit the Brands table at a time. Please try again."
Else
DoCmd.OpenForm "frmEditBrands", acNormal
DoCmd.Close acForm, "frmMaintMainMenu"
End If
But this only appears to work within the same database instance. If I attempt to open a form that accesses this table in another copy of the FE, it opens as normal.
I need a way to check to see if anyone else is accessing the table, and if so, prevent it. I create the table when the form is opened, and clear it when the form is closed, so worst case, i could check for contents in the table, but this seems sloppy.
Thanks
Paul