I have a subform that is populated by the union of two queries. The result are displayed in an unbound listbox.
The contents are software license keys and expire dates for software we write for our customers
My desire is to be able to dbl click on an item in the list box and have it take me to the Contact Management Form for the customer in question.
This is the Row Source for my unbound List box:
SELECT ExpiresIn60Days.CompanyName, ExpiresIn60Days.Item AS Product, ExpiresIn60Days.[What's Expiring], ExpiresIn60Days.EXPIRES, ExpiresIn60Days.SerialNo FROM ExpiresIn60Days ORDER BY ExpiresIn60Days.EXPIRES;
I have a button on my main menu that takes me to the Contacts Form, from there I have to select the contact from a drop down list.
This is the button that take me to the Contact Form:
Private Sub EditContacts_Click()
On Error GoTo Err_EditContacts_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Contacts"
DoCmd.OpenForm stDocName, , , stLinkCriteria
And here is the code for the combo box that opens the customer in the Contact Form
Private Sub Combo22_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CustNumber] = " & Str(Me![Combo22])
Me.Bookmark = rs.Bookmark
My goal is to click anywhere on the item in the list box, and have it open the contact form with the same customer as who I clicked on in the list box.
Please ask any questions needed to make this work.