Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Multiple criteria for FindFirst.

Posted on 1998-09-15
1
874 Views
Last Modified: 2013-12-25
What format do I use when specifying criteria for a FindFirst method that references multiple fields in the table?  All the examples I find use only one criterion, ex. "txtFName like 'Ba*'".   I need to check txtFName and txtSS# and BDate and DateEntered etc.  I thought of requerying, but a datacontrol is already in place; or can I build an SQL recordset from a datacontrol.

halp
tanx
0
Comment
Question by:RUSTY
1 Comment
 
LVL 6

Accepted Solution

by:
anthonyc earned 20 total points
ID: 1496273
It's always faster to requery than findfirst, but if you wish to use findfirst, the criteria you specify resembles an SQL Where clause

For example

data1.recordset.findfirst "txtFName like 'BA*' and txtSS like '123*' and txtBDate like '12/31/1998'"

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question