473,509 Members | 2,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Leftover" tab

Hi all,
I have a subform placed on a tab control, and I'm having a terrible
time with proper tab order. I'm trying to allow the user to tab from
the last control on my subform to a control on the same page on the tab
control on the parent form.

The control (a button) on the subform executes the following code On Key
Down:

Private Sub AddContactButton_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab And Shift = 0 Then
Me.parent.Form.signaturePresent.SetFocus
End If
End Sub
The problem is that the focus is ending up on the control _after_
signaturePresent, which is off of the tab control page. If I place
statements in the event code for signaturePresent's Got Focus event they
run, but whether or not they run, the focus always seems to go to the
next control. The same thing happens when I apply this technique to a
different subform in the same form.

It seems as though there is a "leftover" tabbing event, and this fires
after the SetFocus action completes, and sends you to the control after
the one you specified. Is there any way to flush that event out or
otherwise get rid of the extraneous tab event?

Thanks,

Eric
Nov 13 '05 #1
1 1646
Eric, if the "AddContactButton" is a button, why aren't you using the
"Click" event of the button to run the setfocus.

The code below runs when you click button "Command17". Command17 is a button
on a subfrm located on a tab control and cmdCopyPasteApprovedVendorChgs is a
button on the Paren form. Click the button "Command17" and the
cmdCopyPasteApprovedVendorChgs button gets the focus.

Private Sub Command17_Click()
Me.Parent.Form.cmdCopyPasteApprovedVendorChgs.SetF ocus
End Sub

Regards,
Barry

"Eric E" <wh*******@bonbon.net> wrote in message
news:hd********************@speakeasy.net...
Hi all,
I have a subform placed on a tab control, and I'm having a terrible time
with proper tab order. I'm trying to allow the user to tab from the last
control on my subform to a control on the same page on the tab control on
the parent form.

The control (a button) on the subform executes the following code On Key
Down:

Private Sub AddContactButton_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab And Shift = 0 Then
Me.parent.Form.signaturePresent.SetFocus
End If
End Sub
The problem is that the focus is ending up on the control _after_
signaturePresent, which is off of the tab control page. If I place
statements in the event code for signaturePresent's Got Focus event they
run, but whether or not they run, the focus always seems to go to the next
control. The same thing happens when I apply this technique to a
different subform in the same form.

It seems as though there is a "leftover" tabbing event, and this fires
after the SetFocus action completes, and sends you to the control after
the one you specified. Is there any way to flush that event out or
otherwise get rid of the extraneous tab event?

Thanks,

Eric

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
2123
by: Alex Martelli | last post by:
I hesitate a bit to post this, but... on the Italian Python NG, somebody was asking whether there was any way to convert an integer number x into a string which represents it in an arbitrary base N...
9
5792
by: Peter Hansen | last post by:
The term "mock filesystem" refers to code allowing unit or acceptance tests to create, read and write, and manipulate in other ways "virtual" files, without any actual disk access. Everything is...
12
4987
by: bokiteam | last post by:
Hi All, I dont' know why I can not pop up a message box. MsgBox("test") it is ok in vb6... Best regards, Boki.
3
4437
by: Stan Brown | last post by:
Posted by Pierre Blais in the current RISKS Digest: http://catless.ncl.ac.uk/Risks/24.24.html#subj9 -- Stan Brown, Oak Road Systems, Tompkins County, New York, USA http://OakRoadSystems.com/...
28
2907
by: Steven Bethard | last post by:
Ok, I finally have a PEP number. Here's the most updated version of the "make" statement PEP. I'll be posting it shortly to python-dev. Thanks again for the previous discussion and suggestions!...
5
13304
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
7347
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7073
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.