Kath Pelletti
kp at sdsonline.net
Thu Jul 10 21:19:23 CDT 2008
Hi all - I am looking for some code/command to move focus to the next control on a subform . Before I start mucking around with retrieving the tab index for the current control and trying to use that to move to the next one, just want to check. Am I missing something simple? Is there some simple command or code which would do something like 'GotoControl - Next?' I could (of course) nominate the name of the control I want to go to but as I will need to use this code for many controls, i want something generic. tia Kath Existing code for subcontrol: -------------------------------------------------------------------------------- Private Sub SpecialDiet_AfterUpdate() Dim strerrormsg As String On Error GoTo Err_Handler Me.DateLastRevised = CurrentDate() Me.Parent.Requery Me.SpecialDiet.setfocus 'TAB TO NEXT CONTROL Normal_exit: DoCmd.SetWarnings True Exit Sub Err_Handler: MsgBox "Error: [" & Err.Number & "] " & IIf(Len(strerrormsg) > 0, strerrormsg, Err.Description), vbCritical, "Error Message" Resume Normal_exit End Sub ______________________________________ Kath Pelletti Software Design and Solutions Pty Ltd Ph: 9505-6714 Fax: 9505-6430 kp at sdsonline.net