more than one focus

  • Thread starter Thread starter seeker
  • Start date Start date
S

seeker

I have a client who wants focus to occur on a textbox and
also on another textbox in a subform. In essence a multi
setfocus option. Is that possible? and if not is there a
workaround.

seeker
 
You can't have focus on more than one object at a time. Depending on why
you would want to, there may be a work around. Need more detail on what you
are attempting to do.

Kelvin
 
My client does a search by entering a partial name in a
textbox which begins searching in the subform as each
letter is entered. Once found he wants to be able to down
or up arrow in the subform and at the same time have the
search capability in the textbox of the parent form
without placing the mouse cursor in the box. For some
reason he is mouse phoebic. Thanks for the possible work
around.

seeker
 
I am confused by what you want. You want a text box on the main form, that
once a person starts typing, the subform will change to the closest match.
Then after the correct information is shown on the subform, you want to
press the up or down arrow on the keyboard and make the subform go to the
previous or next record on the list in the text box on the main form.

A look up box is not meant to completely fill out a form as you type, it
only fils in the current box. To do what you want, you will have to trap
each key stroke and update the subform each time. Although this can be
done, I wouldn't recommend doing it this way.

If your client doesn't liek using the mouse how do you expect to get from
typing in the search box to using the subform then back to the textbox to do
another search?

Kelvin
 
Your last question gets to the crux of the problem. Yes
it would be easy to take the mouse cursor and place it in
the appropriate box but the client does not want to do
that. He wants to be able to type in the main form and
then when down typeing be able to more from record to
record in subform but if he wants to type something else
he wants to be able to do that without putting mouse
cursor in that box. His dos program works that way.
Thanks for continued threading.

seeker
 
If your client doesn't liek using the mouse how do you
expect to get from
typing in the search box to using the subform then back to the textbox to do
another search? This is the very question that I am
trying to solve. I can set focus to the main form onexit
of the textbox in the subform but then the arrow has to be
hit twice. client does not like that. So short of "it
cant be done that way" what work around would you
suggest? All of the other part of your reply proved that
you understand the problem. His archaic DOS program does
what he wants so we should be able to incorporate this in
access 2000 somehow -- thanks for continued threads.

seeker
 
I understand what you want to do, I don't know why you are want to do it
this way. Why are you using a subform to show the data of the search field
is in the main form. Could just one form be used? I normally put the
search field in the header of the form that contains the data I am looking
up, then when the field matches what I want (i.e. When I hit enter) the form
moves to that record. Hitting the arrows then moves to the previous or next
record. With one form, the keystrokes can be trapped to look for the up and
down arrow keys. I can't think of doing it with a main form and a subform.
If your file is small enough I'd be happy to look at it, just email it to
me.

Kelvin
 
Back
Top