FindFirst with 2 arguments ?

  • Thread starter Thread starter Gina
  • Start date Start date
G

Gina

my table has two fields as key:
PK det (autonumber), FK wrk (integer)

I would like to do a rst.FindFirst with 2 'where conditions'
________ ....
det = "DetailID = " & arWords(i)
wrk= "WorkID = " & arWords(i + 1)
--> rst.FindFirst det & wrk ' how should I
write this line
If rst.NoMatch Then
rst.AddNew
rst.Fields(i) = arWords(i)
End If
Else
If Not (rst.NoMatch) And Not arWords(i) = "" Then
rst.Edit
End If
If Not IsNull(arWords(i)) Then
rst.Fields(i) = arWords(i)
End If
End If
....
________

Thanks in advance
Gina
 
Try this -- you need to include the And operator in the string that you
build:

rst.FindFirst det & " And " & wrk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top