Hi guys
I've been trying to figure out the following for some time.
I have the following code on the On Mouse Down event of a TextBox control on a form in Continuous form mode that is in a Tabbed form that I have been using to try to determine the cause of my problem:
Private Sub SupplierName_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim sWhere As String
If Button = acLeftButton Then
MsgBox "You pressed the left button."
sWhere = "[PartID] = " & Me.PartID
DoCmd.OpenForm "fPartsEdit", acNormal, , sWhere
End If
If Button = acRightButton Then
MsgBox "You pressed the right button."
sWhere = "[PartID] = " & Me.PartID
DoCmd.OpenForm "fPartsEdit", acNormal, , sWhere
End If
If Button = acMiddleButton Then
MsgBox "You pressed the middle button."
sWhere = "[PartID] = " & Me.PartID
DoCmd.OpenForm "fPartsEdit", acNormal, , sWhere
End If
End Sub
The above detects if the right, middle or left buttons on the mouse is clicked and then opens a form called "fPartsEdit"
If I left click or middle click, the forms opens on top of the main form which is exactly what I want. If I right click, the "fPartsEdit" form is opened behind the main form....why????
I want to use the right click but it is acting weird...
Thanks for any help
I've been trying to figure out the following for some time.
I have the following code on the On Mouse Down event of a TextBox control on a form in Continuous form mode that is in a Tabbed form that I have been using to try to determine the cause of my problem:
Private Sub SupplierName_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim sWhere As String
If Button = acLeftButton Then
MsgBox "You pressed the left button."
sWhere = "[PartID] = " & Me.PartID
DoCmd.OpenForm "fPartsEdit", acNormal, , sWhere
End If
If Button = acRightButton Then
MsgBox "You pressed the right button."
sWhere = "[PartID] = " & Me.PartID
DoCmd.OpenForm "fPartsEdit", acNormal, , sWhere
End If
If Button = acMiddleButton Then
MsgBox "You pressed the middle button."
sWhere = "[PartID] = " & Me.PartID
DoCmd.OpenForm "fPartsEdit", acNormal, , sWhere
End If
End Sub
The above detects if the right, middle or left buttons on the mouse is clicked and then opens a form called "fPartsEdit"
If I left click or middle click, the forms opens on top of the main form which is exactly what I want. If I right click, the "fPartsEdit" form is opened behind the main form....why????
I want to use the right click but it is acting weird...
Thanks for any help