Field Contains?


G

Guest

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
 
Ad

Advertisements

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
 
Ad

Advertisements

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
 

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

Top