Filter Problem

KodeKing

Registered User.
Local time
Today, 17:07
Joined
Sep 5, 2003
Messages
10
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.

:confused:

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
 
Why not just give the person a unique ID? Then its just
Dim frm As Form_YourForm
Dim strFormName As String

strFormName = "YourForm"

DoCmd.OpenForm strFormName, , , "[CustomerID] = " & Me!lstBoxName

DoCmd.Close acForm, Me.Name
 
I thought of that but that would mean allocating each note a Unique ID.

Because many notes can belong to one person this procedure will display all notes relating to that customer, when I only require the specific note the user requested.

Thanks.
 
If one Customer can have many notes then each note should have a unique ID.
 

Users who are viewing this thread

Back
Top Bottom