Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2004, 07:47 PM
rjp rjp is offline
Registered User
 
Join Date: Aug 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB Finding matching records

I am having trouble working out how to specify 2 fields values in the FIND method for ADODB recordsets.

I have tried various versions of the following:


criteria1 = "[field1] = 'value1' AND [field2] = 'value2'"
rst.Find criteria1, , adSearchForward

it works when i use one of the fields eg:

criteria2 = "[field1] = 'value1'"
rst.Find criteria2, , adSearchForward

i guess there is some other format for achieving this. I have faint recollections of seeing something like Array(field1,field2) ... somewhere but then again it might just have been a dream.





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in updating records & finding records naveed77 VB Databases Basics 1 January 16th, 2007 12:12 PM
problem in updating records & finding records naveed77 VB How-To 1 January 16th, 2007 12:10 PM
Finding matching rows on two worksheets Wire323 Excel VBA 0 April 13th, 2006 12:11 AM
Query to display non matching records. AJ Access VBA 1 April 7th, 2005 05:05 PM
Finding a matching value Morry Excel VBA 2 March 26th, 2004 05:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.