Hi
I Have a form "frmmanufacturers" that has a subform listing parts supplied by a particular manufacturer. I wish to be able to double click the part number [partno] field on the subform which will open another form displaying the matching record.
I am trying the following - with no luck!
Private Sub partno_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmcompapp"
stLinkCriteria = "[partno] = " & Me.partno
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.RunCommand acCmdApplyFilterSort
Exit_partno_DblClick:
Exit Sub
Err_partno_DblClick:
MsgBox Err.Description
Resume Exit_partno_DblClick
End Sub
This generates a Runtime error 2501 "The openform action was canceled"
Can any one help?
I Have a form "frmmanufacturers" that has a subform listing parts supplied by a particular manufacturer. I wish to be able to double click the part number [partno] field on the subform which will open another form displaying the matching record.
I am trying the following - with no luck!
Private Sub partno_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmcompapp"
stLinkCriteria = "[partno] = " & Me.partno
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.RunCommand acCmdApplyFilterSort
Exit_partno_DblClick:
Exit Sub
Err_partno_DblClick:
MsgBox Err.Description
Resume Exit_partno_DblClick
End Sub
This generates a Runtime error 2501 "The openform action was canceled"
Can any one help?