JamesSF wrote:
>ok thanks - that works - got me on the right track
>
>is there a better way besides doing a dlookup?
>
>on the before insert, i have it check the table for that person to see if
>they have been flagged inactive, if they have, i can cancel and undo the
>selection and msgbox the user
DLookup is easier and just as fast as any other way. If
speed is critical and if each person is a unique record in
the table, you might(?) find that:
DCount("*", "table", "personID= & Me.personID & " AND
inactivedate Is Not Null")
is a little faster, especially if both THe PersonID and
InactiveDate fields are indexed.
--
Marsh
MVP [MS Access]
|