I've got a list box containing all notes entered for a customer. The user needs to be able to double click the relevant entry and be take to the corresponding entry in another form. This is the filter I've got at the moment (below). As far as I can see it should work, but it doesn't.
Any Ideas???
Thanks
Dim stDocName As String
Dim stCondition As String
Dim stDate As String
Dim stNote As String
Dim stFirstname As String
Dim stSurname As String
stDate = Form_Contacts.CON_NOTES.Column(0, CON_NOTES.ItemsSelected(0))
stNote = Form_Contacts.CON_NOTES.Column(1, CON_NOTES.ItemsSelected(0))
stFirstname = Form_Contacts.CON_FIRSTNAME
stSurname = Form_Contacts.CON_SURNAME
Form_Contacts.Visible = False
stCondition = "((Form_Notes.NOT_DATE) = (#" & stDate & "#) AND " & _
"((Form_Notes.NOT_NOTE) = ('" & stNote & "') AND " & _
"((Form_Notes.NOT_FIRSTNAME) = ('" & stFirstname & "') AND " & _
"((Form_Notes.NOT_SURNAME) = ('" & stSurname & "')"
stDocName = "Notes"
DoCmd.OpenForm stDocName, , stCondition

Any Ideas???
Thanks
Dim stDocName As String
Dim stCondition As String
Dim stDate As String
Dim stNote As String
Dim stFirstname As String
Dim stSurname As String
stDate = Form_Contacts.CON_NOTES.Column(0, CON_NOTES.ItemsSelected(0))
stNote = Form_Contacts.CON_NOTES.Column(1, CON_NOTES.ItemsSelected(0))
stFirstname = Form_Contacts.CON_FIRSTNAME
stSurname = Form_Contacts.CON_SURNAME
Form_Contacts.Visible = False
stCondition = "((Form_Notes.NOT_DATE) = (#" & stDate & "#) AND " & _
"((Form_Notes.NOT_NOTE) = ('" & stNote & "') AND " & _
"((Form_Notes.NOT_FIRSTNAME) = ('" & stFirstname & "') AND " & _
"((Form_Notes.NOT_SURNAME) = ('" & stSurname & "')"
stDocName = "Notes"
DoCmd.OpenForm stDocName, , stCondition