Field Contains?

R

rico

Is there a function for to ask whether a field in table or query contains a
certain value? eg

If table1.[number] ""contains"" 10 then
do somthing etc etc.

TIA
 
N

Nikos Yannacopoulos

Rico,

Sort of... you can use a DCount() function to count the number of
records in the table in which the field value is x, or contains a
certain string. If no match, then the function will return 0. Look up
the function in Help if unfamiliar.

HTH,
Nikos
 
A

aaron.kempf

well, you should be using Access data projects.. and if you're doign
that instead of crappy mdb; then you can use Full Text Search to use
the contains keyword.

-aaron
 
C

Chriske911

Is there a function for to ask whether a field in table or query contains a
certain value? eg

If table1.[number] ""contains"" 10 then
do somthing etc etc.

TIA

dao.recordset.findstring
use the if dao.recordset.nomatch then... clause
to build your code

grtz
 
Top