Solved

Multiple criteria for FindFirst.

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now