Solved

Multiple criteria for FindFirst.

Posted on 1998-09-15
1
872 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

777 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