Solved

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

Posted on 2014-02-14
6
281 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
  • 5
6 Comments
 

Author Comment

by:lehi52
Comment Utility
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
Comment Utility
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
Comment Utility
Please help.  This is the last thing for a while that I need.
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 14

Accepted Solution

by:
Bill Ross earned 500 total points
Comment Utility
Hi,

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

Regards,

Bill
0
 

Author Comment

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

Author Closing Comment

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

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now