I have a table with an EmployeeID-field and a date-field. Before I add a new
record I want to check that there is no record with that specific EmployeeID
number and specific date already, because I want only one record with that
specific combination of the EmployeeID number the date.
Which function do you suggest?
I tried with FindFirst, but with that I can only test for one field.
Yes I am not much experienced with Access/VBA.
Why not go into table design an create a two-field index and set to unique?

Signature
KARL DEWEY
Build a little - Test a little
> I have a table with an EmployeeID-field and a date-field. Before I add a new
> record I want to check that there is no record with that specific EmployeeID
[quoted text clipped - 3 lines]
> I tried with FindFirst, but with that I can only test for one field.
> Yes I am not much experienced with Access/VBA.
BrunoKP - 11 Jan 2008 12:08 GMT
Good idea, which I have followed. But still I have to check for unique-ness
before I add a new record. I found another answer by Douglas J. Steele:
(...And ContactDate = " & Format(SalesForce.Fields("Date"),
"\#yyyy\-mm\-dd\#") & " And ContactType= '" & SalesForce.Fields("Type") & "'")
about how to check for multible criterias in FindFirst, included a date. In
that way the whole problem has been solved.
"KARL DEWEY" skrev:
> Why not go into table design an create a two-field index and set to unique?
>
[quoted text clipped - 5 lines]
> > I tried with FindFirst, but with that I can only test for one field.
> > Yes I am not much experienced with Access/VBA.