troubleshooting Question

Double Click Access 2010 Form Field And Open Another Form Filtered By Clicked Field's Value

Avatar of Scamquist
ScamquistFlag for United States of America asked on
Microsoft AccessVisual Basic Classic
3 Comments1 Solution943 ViewsLast Modified:
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.
NorieAnalyst Assistant
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros