FindRecord, FindNext

A

Access101

I'm just dying on this one. I know that there are other, perhaps better
options (RecordsetClone, Bookmark, Find, Seek), but I am getting stubborn at
this point and just want this SIMPLE method to work:

On a form I created in Access 2002, I type the word "Test" into the
Me.FindIt Text Box located in the forms header.

Then, I click a button with this code under it:

DoCmd.FindRecord Me.FindIt, acAnywhere, True, acDown, True, acAll, False

Clicking the button multiple times only finds the word "Test" in the
Me.FindIt TextBox, but not in any of the records containing the word "Test".

I thought the False at the end was supposed to make it go to FindNext.

From what I can tell, the code should:

Look for the text ANYWHERE in a field
MATCH CASE
SEARCH DOWN
AS IT APPEARS IN DB
ALL FIELDS
NOT JUST FIND FIRST

Using this on a different button after pressing the first one above is no
help either:

DoCmd.FindNext

Any air at this point would be welcomed.
Thanks for your help.
 
M

missinglinq via AccessMonster.com

You almost got it right. "I thought the False at the end was supposed to make
it go to FindNext." is oncorrect. An argument of TRUE here starts the search
at the first record. An argument of FALSE (this is directly from Access Help)
"starts the search at the record following the current record. If you leave
this argument blank, the default (TRUE) is assumed"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top