Avatar of Scamquist
Scamquist
Flag for United States of America asked on

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"
End Sub


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?


Any help will be appreciated.
Microsoft AccessVisual Basic Classic

Avatar of undefined
Last Comment
Scamquist

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Norie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Scamquist

ASKER
Works Great!
Scamquist

ASKER
Thank you very much.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes