Hi all, need your help on fixing some issue in my access form. I have a user form with multiple controls,like 4 textbox linear to each checkbox. when the checkbox control is checked it should move to next tab index (which is the textbox). until last week i was able to do this with Sendkeys function in VBA, but now my pc is migrated to windows 7 and i read online that windows 7 does not support sendkeys function.
i tried below code but it takes too long till it tab to next control.:banghead:
Dim ctl As Control
Dim currenttab, test As Long
currenttab = Forms!formname.ActiveControl.TabIndex
For Each ctl In Forms!Tracker!TabCtl0
If ctl.ControlType = acTextBox Then
If ctl.TabIndex = currenttab + 1 Then
ctl.SetFocus
Exit For
End If
End If
Next ctl
Can someone please suggest any alternative code or logic for this.
i tried below code but it takes too long till it tab to next control.:banghead:
Dim ctl As Control
Dim currenttab, test As Long
currenttab = Forms!formname.ActiveControl.TabIndex
For Each ctl In Forms!Tracker!TabCtl0
If ctl.ControlType = acTextBox Then
If ctl.TabIndex = currenttab + 1 Then
ctl.SetFocus
Exit For
End If
End If
Next ctl
Can someone please suggest any alternative code or logic for this.