Remove SetFocus

  • Thread starter SurveyorinVA via AccessMonster.com
  • Start date
S

SurveyorinVA via AccessMonster.com

Good morning....

I have a form with one text box and several labels. To help make the form
user friendly I have added several buttons that act as tab controls. When I
click button 1, all the labels become visible and the text box become visible
= false. When I click button 2, all the labels become visible = false and
the text box becomes visible. The user has the ability to enter data into
this text box and save it. At this point, the user has the ability to click
button 1 again, which as mentioned makes all the labels visible and the text
box becomes visible = false.

However at this point I get an error message because the text box has focus
and can not become visible = false until another control has focus. I have
no other controls on the form. Is there a way to make the text box loose
focus without setting focus on another control?

Any help in this would be greatly appreciated.
thanks,
Chris
 
M

Mr B

Create another textbox. Set the width to zero. Set the BAck Stype to
Transparent. Set the Special Effect to flat. Set the keft and top to zero.
Name this control "txtHoldCursor". Set this control to be the first control
in the Tab Order list.

You will need to set the focus to your original text box when you make it
visible and then just be form making that original text box invisible, set
the focus to the "txtHoldCursor" text box.

--
HTH

Mr B
email if needed to:
draccess at askdoctoraccess dot com
 
T

tobesurveyor via AccessMonster.com

That's great, Thanks

Mr said:
Create another textbox. Set the width to zero. Set the BAck Stype to
Transparent. Set the Special Effect to flat. Set the keft and top to zero.
Name this control "txtHoldCursor". Set this control to be the first control
in the Tab Order list.

You will need to set the focus to your original text box when you make it
visible and then just be form making that original text box invisible, set
the focus to the "txtHoldCursor" text box.
Good morning....
[quoted text clipped - 15 lines]
thanks,
Chris
 
M

Mr B

Your quite welcome.

Glad to help.
--
HTH

Mr B
email if needed to:
draccess at askdoctoraccess dot com


tobesurveyor via AccessMonster.com said:
That's great, Thanks

Mr said:
Create another textbox. Set the width to zero. Set the BAck Stype to
Transparent. Set the Special Effect to flat. Set the keft and top to zero.
Name this control "txtHoldCursor". Set this control to be the first control
in the Tab Order list.

You will need to set the focus to your original text box when you make it
visible and then just be form making that original text box invisible, set
the focus to the "txtHoldCursor" text box.
Good morning....
[quoted text clipped - 15 lines]
thanks,
Chris
 

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