Strange Textbox Behaviour (1 Viewer)

zooropa67

Registered User.
Local time
Today, 23:51
Joined
Mar 19, 2013
Messages
42
I wondered if anyone can suggest the reason for the following strange behaviour. I have three textboxes txt1, txt2, txt3 and a command button Command1. When I enter a value into txt1 then press the return key the click even of the Command button is triggered rather than the txt2 receiving focus. I don't have and event code associated with the textboxes. The Index Order is 0,1,2,3 respectively. Any ideas? Thanks:banghead:
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:51
Joined
Feb 19, 2013
Messages
16,616
I presume by index order you mean tab order?

Also, are you sure you have the event code assigned to the correct control? With meaningless names it is an easy mistake to make.
 

zooropa67

Registered User.
Local time
Today, 23:51
Joined
Mar 19, 2013
Messages
42
Thanks for your reply CJ. Yes, I mean Tab Index. I would have thought that when i hit the return key the cursor would just hop from one textbox to the next in the order of the TabIndex order
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:51
Joined
Feb 19, 2013
Messages
16,616
would have thought that when i hit the return key the cursor would just hop from one textbox to the next in the order of the TabIndex order
it will providing there is a) no code to disrupt it and b) tabstop=yes

did you check the code is assigned to the correct control?
 

zooropa67

Registered User.
Local time
Today, 23:51
Joined
Mar 19, 2013
Messages
42
Hi CJ, thanks for your suggestions. I figured it out. It was because the Command Button Default property was set to Yes instead of No
 

Users who are viewing this thread

Top Bottom