B
Bob Quintal
=?Utf-8?B?TmV0d29ya1RyYWRl?=
operation. You can test for this condition with
=Isnull(dcount("*","YourTable","[LastName]='" & [LastName] &
"'")
A sometimes faster way of determining the presence or absence is
to
change to the dLookup() function with the same where clause,
reason being that DLookup stops looking when it hits the first
matching row, DCount has to do every row. If it's not there
DLookup is as slow as DCount.
dCount, like all the aggregate functions ignore nulls in theirHave a macro with the MsgBox action, and enter an appropriate
message to display. In the Condition
DCount("*","YourTable","[LastName]='" & [LastName] & "'")>0
With the form's ComboBox (sourced on a query) this works fine
to warn "if there" with this macro in the BeforeUpdate event.
But have tried to do same thing on a similar ComboBox to warn
if "not there" by changing the > to an =:
DCount("*","YourTable","[LastName]='" & [LastName] & "'")=0
Not getting triggered......not sure why not....
operation. You can test for this condition with
=Isnull(dcount("*","YourTable","[LastName]='" & [LastName] &
"'")
A sometimes faster way of determining the presence or absence is
to
change to the dLookup() function with the same where clause,
reason being that DLookup stops looking when it hits the first
matching row, DCount has to do every row. If it's not there
DLookup is as slow as DCount.