?
Solved

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

Posted on 2014-02-14
6
Medium Priority
?
291 Views
Last Modified: 2014-02-19
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
0
Comment
Question by:lehi52
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 

Author Comment

by:lehi52
ID: 39860318
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
 

Author Comment

by:lehi52
ID: 39860616
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
 

Author Comment

by:lehi52
ID: 39860660
Please help.  This is the last thing for a while that I need.
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 14

Accepted Solution

by:
Bill Ross earned 2000 total points
ID: 39861247
Hi,

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

Regards,

Bill
0
 

Author Comment

by:lehi52
ID: 39861424
Such a simple resolution.  haha.   You are awesome.   Thanks for your help.
0
 

Author Closing Comment

by:lehi52
ID: 39861425
Such a simple resolution.  haha.   You are awesome.   Thanks for your help.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question