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!

cannot disable command button 1

Status
Not open for further replies.

NewTexican

Technical User
Dec 10, 2004
95
US
Forms![person f].Form.Command20.SetFocus
Me![person address Q subform].Form.Command14.Enabled = False

I keep getting an error saying that this command has focus and I cannot disable it. Can you see what is wrong with me redirecting my focus.
 
He he - the focus is a strange thing, you have form focus and control focus. On a form a control has focus even if the form doesn't, so you'll need to setfocus to another control on the same form as the command button is on, prior to trying to alter it's enabled property. Perhaps something like this:

[tt]Me![person address Q subform].Form!txtSomeOtherControl.SetFocus
Me![person address Q subform].Form.Command14.Enabled = False[/tt]

Roy-Vidar
 
my extreme focus on focus has affected my ability on focus. You fixed it. I'd be dead without this forumn. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top