Solved

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

Posted on 2014-02-14
6
289 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Accepted Solution

by:
Bill Ross earned 500 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

688 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