G
giannis
I need to write a clause for the criterion of the find method.
Suppose that :
Dim n , s , criterion, m as String
Dim myrecordset as Recordset
m = "John Brown"
n = Left (m , 4)
s = Right (m , 5)
i need find the first record with [Name]=n and [Surename]=s
How must write the criterion for the find method myrecordset.FindFirst
criterion )
Whether from the follow clouses is correct ? The first or the second ?
1) criterion = "[Name]=" & n & " AND " & "[Surename]=" & s
or the :
2) criterion = "[Name]=" & "'" & n & "'" & " AND " & "[Surename]=" & "'" & s
& "'"
???
Suppose that :
Dim n , s , criterion, m as String
Dim myrecordset as Recordset
m = "John Brown"
n = Left (m , 4)
s = Right (m , 5)
i need find the first record with [Name]=n and [Surename]=s
How must write the criterion for the find method myrecordset.FindFirst
criterion )
Whether from the follow clouses is correct ? The first or the second ?
1) criterion = "[Name]=" & n & " AND " & "[Surename]=" & s
or the :
2) criterion = "[Name]=" & "'" & n & "'" & " AND " & "[Surename]=" & "'" & s
& "'"
???