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!

Button Woes 1

Status
Not open for further replies.

smurf01

IS-IT--Management
Jul 6, 2002
470
GB
Can someone help me I have a simple password form that contains a textbox and a command button. I know that this is probably very simple but I cannot seem to sort it.

When the user has entered the password, if they press the "Return" key on the keyboard then it sets the focus to the command button, if they then press "Return" again the requested form opens but they also get an error message as shown below

Run-time Error 2427
You entered an expression that has no value


If they enter the password and then click the command button the requested form opens without any error messages.

Regards

Paul
 
I'm not sure about the error, but one way how you may be able to bypass it, set the Default Property on the command button to True, which then whenever the user presses the return key on the form, that command button's Click Event will be triggered.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
Ronald,
Thanks for the Info

Regards

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top