Moving to Accwess Forum for you.....Thanks for advising
Hi all
Have worked around the issue as follows:
When opening a database I set the following:
gstrAction = "Set Reference to MouseWheel"
gbMouseOnOff = MouseWheelOFF
gbMouseOnOff = MouseWheelON
Each form that can be scrolled trough (Not continous forms) have the following two sub routines:
Private Sub HookOn()
gstrAction = "Reattach Form to MouseWheel"
gbMouseOnOff = MouseWheelON
DoCmd.RunSQL ("UPDATE tblADMISecurity " _
& "SET tblADMISecurity.secuHook ='On' " _
& "WHERE tblADMISecurity.secuUser = '" _
& gstrCurrUser & "';")
End Sub
Private Sub HookOff()
gstrAction = "Setting Mousewheel"
gbMouseOnOff = MouseWheelOFF(False)
DoCmd.RunSQL ("UPDATE tblADMISecurity " _
& "SET tblADMISecurity.secuHook ='Off' " _
& "WHERE tblADMISecurity.secuUser = '" _
& gstrCurrUser & "';")
End Sub
Then on Add or Edit I run the following:
gstrAction = "Check if this User is Editing anything"
strHook = NZ(DLookup("secuHOOK", "tblADMISecurity" _
, "secuUser = '" & gstrCurrUser & "'"))
If strHook = "On" Then
strUserName = NZ(Me!recLockedBy)
If strUserName = gstrCurrUser Or Len(strUserName) = 1 Then
Call HookOff
Me!recLockedBy = gstrCurrUser
frmState = 1
SetForm Me
Me.Refresh
Me!acroDescription.SetFocus
Else
MsgBox "This Record is Locked by " & strUserName, _
vbExclamation, "Locking Message"
End If
Else
MsgBox "Hola, " & gstrFirstName _
& vbCrLf & "You are already working in another Form" _
& vbCrLf & "On another Record" _
& vbCrLf & "Please try to keep things tidy" _
, vbInformation, ErrMsgHelp
End If
On Save or Form Close I reset the Mouse Hook:
Call HookOn
It may not be elegant, but it works. I have 7 applications running with about 40 users.
Regards
Avellano