Find via code

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

In form view, find command (Ctrl-F) is available to search records by a
field value. How can I do this find via code i.e. search for a record for a
given value in a field?

Thanks

Regards
 
The general method is to use FindFirst Method of the (DAO) Recordset Object.
similarly, you can use ADO rather than DAO.

If you only wants a Field value of a Record whose value in another Field
matches some given value, you can use DLookUp() function also.

Check Access VB Help on Recordset, FindFirst, DLookUp (which is included in
Domain Aggregate Functions).

HTH
Van T. Dinh
MVP (Access)
 

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