Double Click Access 2010 Form Field And Open Another Form Filtered By Clicked Field's Value
I have a form named frmDeptHrs. The form has 20 records.
Is it possible to click on one of the of the fields (say 60-DL1-MACHINE which is field Id_Dept on the form FrmDeptHrs) and open another form named frmDeptWCHours filtered by the IdDept from the frmDeptHrs form?
I have tried the code:
Private Sub ID_DEPT_DblClick(Cancel As Integer)
DoCmd.OpenForm FormName:="DepartmentWCLaborReport", WhereCondition:="IdDept = Me.ID_DEPT"
When I double click, I get the pop-up prompting for a value for Me.ID_Dept
If I enter 60-DL1-MACHINE the Department Work Center form will open with the proper information.
Is there a way to skip the Enter Paramater Value and just open the filtered form?