?
Solved

Multiple criteria for FindFirst.

Posted on 1998-09-15
1
Medium Priority
?
882 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
[X]
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
1 Comment
 
LVL 6

Accepted Solution

by:
anthonyc earned 80 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

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