Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opposite of setfocus 1

Status
Not open for further replies.

NewTexican

Technical User
Dec 10, 2004
95
US
I'm having an issue with disabling buttons that still have focus. Is there an opposite of setfocus?
 
NewTexican,

Simply select another control and give it focus, then disable your buttons. This also helps "guide" the user by placing them "where" they may need to be next.

Just an idea.

Good Luck..

 
Thanks hitech, that's what I have been doing, but I thought there might be a better way, I was also having a problem with this when I guide them to a control on a different subform or from a subform to a mainform.
 
It's probably a syntax problem, check this

syntax for subforms ....
faq181-447

out.

Another option may be something like

Screen.PreviousControl.SetFocus

see VB Help for the Screen object for details.


Happy Holidays,

TomCologne
 
Or, trying to set focus to a control, on a subform, you may need to Set the focus, in stages.
First the subform, then the control,(from main form)...

Me.sfrmPayments.SetFocus
Me.sfrmPayments.Form.txtAmount.SetFocus

and, if I remember correctly, vica versa...

(from the subform)

Me.setFocus
Me.txtClient.SetFocus


Hope this helps, good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top