Field Contains?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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

Back
Top