Hello everyone,
I have a search form with columns and rows. A user can click a cell and it will filter by that cell. A user can double click a field and the record will open based upon the field that was double-clicked. We recently upgraded to Officer 2003 and now we are having issues with the code. After the user double-clicks, the record opens up, but on top of the record is a parameter pop up box. If the user clicks cancel on the parameter box, then he can work on the record. How can I prevent that parameter box from opening? The desired record is already there, it's just behind the parameter box. I have a feeling the problem is in the stlinkcriteria line.
Here is the code:
Private Sub ControlNumber_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmTask"
stLinkCriteria = "[ControlNumber] = Forms![frmSearch]![ControlNumber]"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.RunCommand acCmdApplyFilterSort
Exit_ControlNumber_DblClick:
Exit Sub
Err_ControlNumber_DblClick:
MsgBox Err.Description
Resume Exit_ControlNumber_DblClick
End Sub
Thanks,
Paul
I have a search form with columns and rows. A user can click a cell and it will filter by that cell. A user can double click a field and the record will open based upon the field that was double-clicked. We recently upgraded to Officer 2003 and now we are having issues with the code. After the user double-clicks, the record opens up, but on top of the record is a parameter pop up box. If the user clicks cancel on the parameter box, then he can work on the record. How can I prevent that parameter box from opening? The desired record is already there, it's just behind the parameter box. I have a feeling the problem is in the stlinkcriteria line.
Here is the code:
Private Sub ControlNumber_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmTask"
stLinkCriteria = "[ControlNumber] = Forms![frmSearch]![ControlNumber]"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.RunCommand acCmdApplyFilterSort
Exit_ControlNumber_DblClick:
Exit Sub
Err_ControlNumber_DblClick:
MsgBox Err.Description
Resume Exit_ControlNumber_DblClick
End Sub
Thanks,
Paul