Error when i use my form

Chris Lynch

Registered User.
Local time
Today, 04:14
Joined
Apr 14, 2005
Messages
39
HI when i use my form I get the following error when i use one part of it. The error is
You can't reference a property or method for a control unless that control has focus

Can't someone help me please

Thanks
Chris Lynch
 
Focus

Before you execute the code that generates the error you have
to set the focus on the control involved.

Me.yourcontrol.SetFocus

(replace 'yourcontrol' with the actual control
 
As trucktime says, ensure the control has the focus.

You are probably referring to a control's .Text property. You could probably drop the .Text and then won't have to set the focus to the control.

Also, you might have to ensure the control is enabled. ;)
 
That done it, i set focus on the text box and its all working nicely
 

Users who are viewing this thread

Back
Top Bottom