R
raremind
I posted this in Access Forms but there were no takers. So I figured
this group my be able to help me. Thanks in advance for your help.
I have just upgraded an Access 97 DB to 2007. In the DB I have a main
form that creates a subform in VBA when a selection is made in a
combo
box. This form is used by our data entry personal. I have the subform
set to automatically jump to the next field when an answer is
selected
in a combo box (this helps the data entry personal be very fast when
entering surveys.)
Here is my problem when an answer is selected it stalls for a good 5
seconds then jumps. Since the subform is created in VBA when a
selection is made in the main form I can not hard code the jumps.
This
method worked fine in 97 but in 2007 there seems to be an issue with
it. Can anyone help me, or can anyone see why its stalling?
Sub GoToNextControl()
Dim ctrl As Control
Dim frm As Form
Dim CtrlIndex As Integer
Dim Cnt As String
Set frm = Screen.ActiveForm![New Form].Form
Set ctrl = frm.ActiveControl
CtrlIndex = frm.ActiveControl.TabIndex
Cnt = (frm.Controls.Count / 2)
If ctrl.ControlType = acComboBox And CtrlIndex < Cnt - 1 Then
If ctrl.ListIndex <> -1 Then
frm.Controls.Item(CtrlIndex + 1).SetFocus
End If
End If
End Sub
We have upgraded our computers and are having issues with Windows XP
and Office 97. I need to get this working. I am even willing to send
anyone the DB if they think they can help.
Thanks for your time!
this group my be able to help me. Thanks in advance for your help.
I have just upgraded an Access 97 DB to 2007. In the DB I have a main
form that creates a subform in VBA when a selection is made in a
combo
box. This form is used by our data entry personal. I have the subform
set to automatically jump to the next field when an answer is
selected
in a combo box (this helps the data entry personal be very fast when
entering surveys.)
Here is my problem when an answer is selected it stalls for a good 5
seconds then jumps. Since the subform is created in VBA when a
selection is made in the main form I can not hard code the jumps.
This
method worked fine in 97 but in 2007 there seems to be an issue with
it. Can anyone help me, or can anyone see why its stalling?
Sub GoToNextControl()
Dim ctrl As Control
Dim frm As Form
Dim CtrlIndex As Integer
Dim Cnt As String
Set frm = Screen.ActiveForm![New Form].Form
Set ctrl = frm.ActiveControl
CtrlIndex = frm.ActiveControl.TabIndex
Cnt = (frm.Controls.Count / 2)
If ctrl.ControlType = acComboBox And CtrlIndex < Cnt - 1 Then
If ctrl.ListIndex <> -1 Then
frm.Controls.Item(CtrlIndex + 1).SetFocus
End If
End If
End Sub
We have upgraded our computers and are having issues with Windows XP
and Office 97. I need to get this working. I am even willing to send
anyone the DB if they think they can help.
Thanks for your time!