How can I find a record in a recordset (connected to the SQL Server via code)
I modified my code to look like:
Result: the list was blank
In reality I would like to be able to search with 2 variables (one is a double and the other the description (a string)) - so I can generate a list of unique items.
Thanks in advance
I modified my code to look like:
Code:
Private Sub List1_Click()
Dim Template As String
Template = "[ERemark] = " & Chr$(34) & List1.List(List1.ListIndex) & Chr$(34)
rs.Find Template
End Sub
Result: the list was blank
In reality I would like to be able to search with 2 variables (one is a double and the other the description (a string)) - so I can generate a list of unique items.
Code:
Private Sub List1_Click()
Dim Template As String
Dim NumTemplate as Double
Template = "[ERemark] = " & Chr$(34) & List1.List(List1.ListIndex) & Chr$(34)
NumTemplate = "[TotalExpense] = " & List1.List(List1.ListIndex) 'I'm not sure this is correct
rs.Find Template & NumTemplate 'I'm certain this is wrong
End Sub
Thanks in advance