> Omit the SetFocus line.
>
[quoted text clipped - 19 lines]
> > RunCommand acCmdFind
> > End Sub
Yes, the Look In field will be disabled, and so the search will be in all
the fields of your form, which I think was what you wanted to achieve.
If you cannot use Find/Replace, it could be because your form is unbound.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> If I don't include the SetFocus line it disables the "Look In" Field
> altogether and if I try to do a search it brings up a dialog box that
[quoted text clipped - 31 lines]
>> > RunCommand acCmdFind
>> > End Sub
Dedren - 22 Dec 2005 13:26 GMT
I am trying to search the form but when I omit that SetFocus line it instead
tries to search the database itself, which generates the error message in my
previous post if I actually try to search for something. The entire form is
bound directly to its corresponding tables. Is there no way to specify a
form as the focus?
> Yes, the Look In field will be disabled, and so the search will be in all
> the fields of your form, which I think was what you wanted to achieve.
[quoted text clipped - 36 lines]
> >> > RunCommand acCmdFind
> >> > End Sub
Allen Browne - 22 Dec 2005 14:12 GMT
Dedren, the terms you are using make it impossible to answer your question.
If you have several forms open, you set focus to a particular form (i.e.
make it the active form), but that does not mean that the form itself has
focus instead of one of its controls. The concept of a form having focus in
that sense is a nonsense.
The meaning of "... tries to search the entire database" also eludes me. You
are a form that is trying to search dozens (or hundreds) of tables that
might exist in your mdb file (database)?
"The entire form is bound directly to its corresponding tables" means ??? A
bound form has *one* recordsource. That will be a table, or possibly a
multi-table query or SQL statement.
Sorry: I cannot answer a question I don't understand.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I am trying to search the form but when I omit that SetFocus line it
>instead
[quoted text clipped - 4 lines]
> bound directly to its corresponding tables. Is there no way to specify a
> form as the focus?
Dedren - 23 Dec 2005 13:02 GMT
Is there any way I could send you the DB? or post it somewhere you can take
it from?
> Dedren, the terms you are using make it impossible to answer your question.
>
[quoted text clipped - 21 lines]
> > bound directly to its corresponding tables. Is there no way to specify a
> > form as the focus?
TC - 23 Dec 2005 13:30 GMT
> Is there any way I could send you the DB?
Why? You just need to rephrase your query in a way that Allen & the
rest of us can understand. It's you job to make it clear - not his job
to guess what you mean, by looking at your database :-)
Try to tell us the following:
1. Exactly what you /did/ (in "end user" terms);
2. Exactly what did you thought /should happen/, and
3. Exactly what /did happen/.
Then someone can probably answer you.
Try to avoid descriptions like: "it tries to search the database
itself". No-one is sure what you mean by "it", or "the database
itself", in that sentence. If you mean "the form", say "the form". If a
search returns the wrong records, say "the search returns the wrong
records", and so on.
HTH,
TC
Dedren - 27 Dec 2005 14:00 GMT
That is the best piece of advice I have gotten in a very long time. I had
written a more lengthly thank you before but when I tried to post it I was
logged out from inactivity so it was lost. Currently I am working on a
different approach to letting the user search through the database but this
will help me become clearer if I have any other questions. I just had to
write back to show my appreciation for you taking the time to tell me this.
Again thank you.
> > Is there any way I could send you the DB?
>
[quoted text clipped - 18 lines]
> HTH,
> TC