Results 1 to 2 of 2
Thread: Multiple field FindNext
2001-02-27, 02:28 #1DavidMadgeGuest
Multiple field FindNext
I've specified a multiple-field index in a table but can't see how to use FindNext to refer to both fields. I've tried a few possibilities but none have worked.
Can it be done, and if so how ?
2001-02-27, 08:56 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- Thanked 1 Time in 1 Post
Re: Multiple field FindNext
The FindNext method requires a criteria string. If you have a mutliple-field index, that doesn't mean you have to find on that index, although you can. Your FindNext could take the following form if you used the FindNext method of the recordset:
<pre> rst.FindNext "Field1=" & somevalue _
& " AND Field2=" & someothervalue</pre>
Where Field1 and Field2 represent the field names in your index and somevalue and someothervalue represent the specific values for those fields that you want to find.
If you used the DoCmd.FindNext, you have to start out with a FindRecord, which takes a criteria string, before you can use DoCmd.FindNext without an argument.
<pre> DoCmd.FindRecord "Field1=" & somevalue & " AND " _
& "Field2=" & someothervalue