David McAfee
dmcafee at pacbell.net
Wed Jan 4 12:10:32 CST 2006
Rather than use SendKeys which creates all sorts of fun (numlock turns off) Try calling MoveToPreviousControl: Private Sub MoveToPreviousControl() If Me.ActiveControl.TabIndex = 0 Then Me.Controls(Me.Controls.Count - 1).SetFocus Else Me.Controls(Me.ActiveControl.TabIndex - 1).SetFocus End If End Sub Private Sub MoveToNextControl() If Me.ActiveControl.TabIndex >= Me.Controls.Count - 1 Then Me.Controls(0).SetFocus Else Me.Controls(Me.ActiveControl.TabIndex + 1).SetFocus End If End Sub I whipped up a small sample database if you need to see a working copy David McAfee -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Dan Waters Sent: Wednesday, January 04, 2006 6:27 AM To: AccessD Subject: [AccessD] SendKeys Reverse Tab I'd like to use SendKeys to do a reverse Tab. A forward tab is: SendKeys Chr(9) How do you change this to reverse the direction? Thanks! Dan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com