How to write a code using a DataRow to find a record with the criteria above?VB Code:
'myRS is a DAO recordset myRS.FindFirst "FIRSTNAME='" & Text1.Text & "' AND LASTNAME='" & Text2.Text & "'"
Thanks.
Printable View
How to write a code using a DataRow to find a record with the criteria above?VB Code:
'myRS is a DAO recordset myRS.FindFirst "FIRSTNAME='" & Text1.Text & "' AND LASTNAME='" & Text2.Text & "'"
Thanks.
Here we go:
'myRs is datatable
Dim objCurr() As DataRow
objCurr =myRs.select("FIRSTNAME='" & Text1.Text & "'
AND LASTNAME='" & Text2.Text & "'")
Dim c As DataRow
For Each c In objCurr
msgbox(c.item("FIRSTNAME").tostring & " " & _
c.item("LASTNAME").tostring)
Next
I hope that helps.
regard j
That helped. Thanx!
No problemo.
regard j