really need help with click not going to person clicked on, gozreh

I put a double click event so that when you click on a name,  it takes the user to the form on which the name is located.  Now I tried to use that same on in a different place and it is returning an error.  It works elsewhere just not here.  See code and attached database.  

Private Sub Policy_Name_DblClick(Cancel As Integer)
   DoCmd.SearchForRecord acDataForm, "Contact Form", acFirst, "[ContactID] = " & Nz(Me.ContactID, 0)
   Me.Parent.TabCtl0 = 1
End Sub

Open in new window


This code works on the copy of actions and opps subform.  But it does not work on expiring in 7 days subform.  WHen I double click the policy name in the expiring in 7 days subform is throwing an error.  

See the contact form and go to actions tab and you can try it there.
1st.accdb
lehi52Asked:
Who is Participating?
 
Bill RossConnect With a Mentor Commented:
Hi,

Add Contact ID to the Query "exp next week".

Regards,

Bill
0
 
lehi52Author Commented:
One big difference between the expires in 7 days and the copy of actions and opps subforms is the expires in 7 days is populated based on a query.   How would that change the code.
0
 
lehi52Author Commented:
I think the reason is because the expiring in 7 days subform is pulling data from a query.  So the question is how do I change the code.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
lehi52Author Commented:
Please help.  This is the last thing for a while that I need.
0
 
lehi52Author Commented:
Such a simple resolution.  haha.   You are awesome.   Thanks for your help.
0
 
lehi52Author Commented:
Such a simple resolution.  haha.   You are awesome.   Thanks for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.